Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/vdo/statistics/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/vdo/statistics/__pycache__/KernelStatistics.cpython-36.opt-1.pyc

3

x?ag��@s�dZddlmZddlmZddlmZddlmZddlTddlTddlTGdd	�d	e�Z	Gd
d�de�Z
Gdd
�d
e�ZGdd�de�ZdS)a�
  Copyright Red Hat

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.
  
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  
  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  02110-1301, USA. 
�)�absolute_import)�division)�print_function)�unicode_literals�)�*cseZdZd�fdd�	Z�ZS)�BioStatscs@tt|�j|td�td�td�td�td�gfddi|��dS)N�read�write�discard�flushZfua�procRoot�vdo)�superr�__init__�Uint64Field)�self�name�kwargs)�	__class__��&/usr/lib/python3.6/KernelStatistics.pyrszBioStats.__init__)r)�__name__�
__module__�__qualname__r�
__classcell__rr)rrrsrcseZdZd�fdd�	Z�ZS)�MemoryUsagecs.tt|�j|td�td�gfddi|��dS)NZ	bytesUsedZ
peakBytesUsedr
r)rrrr)rrr)rrrr,szMemoryUsage.__init__)r)rrrrrrr)rrr+srcseZdZd�fdd�	Z�ZS)�IndexStatisticscs`tt|�j|td�td�td�td�td�td�td�tdd	d
�tddd
�g	fd
di|��dS)NZentriesIndexedZ
postsFoundZ
postsNotFoundZqueriesFoundZqueriesNotFoundZupdatesFoundZupdatesNotFoundZcurrDedupeQuerieszcurrent dedupe queries)�labelZmaxDedupeQuerieszmaximum dedupe queriesr
r)rrrr�Uint32Field)rrr)rrrr6s
zIndexStatistics.__init__)r)rrrrrrr)rrr5srcs.eZdZd�fdd�	ZdZ�fdd�Z�ZS)�KernelStatisticscstt|�j|tddd�tddd�td�tdddd	�td
dd�td
dd�td�td�tddd�tddd�tddd�tddd�tddd�tddd�tddd�td d!d�td"d#d�td$d%d�td&d'd�td(d)d�td*d+d�td,d-d�td.d/d�td0d1d�t	d2�gfd3d4d5�|��dS)6N�versionF)Zdisplay�releaseVersion�instanceZfiveTwelveByteEmulationz512 byte emulationz-'on' if ($logicalBlockSize == 512) else 'off')r�derivedZcurrentVIOsInProgressz#current VDO IO requests in progress)rZmaxVIOsz#maximum VDO IO requests in progressZdedupeAdviceTimeoutsZflushOutZlogicalBlockSizeZwriteAmplificationRatiozoround(($biosMeta["write"] + $biosOut["write"]) // float($biosIn["write"]), 2) if $biosIn["write"] > 0 else 0.00)r$ZbiosInzbios in)ZlabelPrefixZ
biosInPartialzbios in partialZbiosOutzbios outZbiosMetaz	bios metaZbiosJournalzbios journalZ
biosPageCachezbios page cacheZbiosOutCompletedzbios out completedZbiosMetaCompletedzbios meta completedZbiosJournalCompletedzbios journal completedZbiosPageCacheCompletedzbios page cache completedZbiosAcknowledgedzbios acknowledgedZbiosAcknowledgedPartialzbios acknowledged partialZbiosInProgresszbios in progressZmemoryUsagezKVDO module�indexZkernel_statsr)ZprocFiler
)
rr rrZStringFieldrZ
FloatFieldrrr)rrr)rrrrMs6




















zKernelStatistics.__init__�cs:tt|�j|�}|jd�tjks.|jd�tkr6td��|S)Nr!r"z!KernelStatistics version mismatch)rr �sampleZgetStat�statisticsVersionZCURRENT_RELEASE_VERSION_NUMBER�	Exception)rZdevicer')rrrr'xszKernelStatistics.sample)r )rrrrr(r'rrr)rrr Ls)r N)
�__doc__Z
__future__rrrrZFieldZ
StatStructZVDOReleaseVersionsrrrr rrrr�<module>s


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists