Current File : //usr/share/dstat/dstat_dstat_ctxt.pyc |
�
�Lc @ s d e f d � � YZ d S( t dstat_pluginc B s e Z d Z d � Z d � Z RS( s(
Provide Dstat's number of voluntary and involuntary context switches.
This plugin provides a unique view of the number of voluntary and
involuntary context switches of the Dstat process itself. It may help
to vizualise the performance of Dstat and its selection of plugins.
c C s1 d | _ d | _ d | _ d | _ d | _ d S( Ns contxt swt voluntaryt involuntaryt totalt di id ( R R R ( t namet varst typet widtht scale( t self( ( s$ /usr/share/dstat/dstat_dstat_ctxt.pyt __init__ s
c C s� t j t j � } t | j � | j d <t | j � | j d <t | j � t | j � | j d <x8 | j D]- } | j | | j | d t | j
| <qk Wt t j
k r� | j j | j � n d S( NR R R g �?( t resourcet getrusaget RUSAGE_SELFt floatt ru_nvcswt set2t ru_nivcswR t set1t elapsedt valt stept opt delayt update( R
t resR ( ( s$ /usr/share/dstat/dstat_dstat_ctxt.pyt extract s #+( t __name__t
__module__t __doc__R R ( ( ( s$ /usr/share/dstat/dstat_dstat_ctxt.pyR s N( t dstatR ( ( ( s$ /usr/share/dstat/dstat_dstat_ctxt.pyt <module> s