.t_c@sdZddlTddlTddlTdefdYZdefdYZdefdYZd efd YZd efd YZd efdYZ defdYZ defdYZ defdYZ defdYZ defdYZdS(s Copyright (c) 2018 Red Hat, Inc. 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. i(t*tBlockAllocatorStatisticscBseZddZRS(RcKsAtt|j|tdtdtdgdd|dS(Nt slabCountt slabsOpenedt slabsReopenedtprocRoottvdo(tsuperRt__init__t Uint64Field(tselftnametkwargs((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRs   (t__name__t __module__R(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRstCommitStatisticscBseZddZRS(RcKs_tt|j|tdddtdtdddtdtdgd d |dS( Ntbatchingtderiveds$started - $writtentstartedtwritings$written - $committedtwrittent committedRR(RRRR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR)s  (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR(stRecoveryJournalStatisticscBseZddZRS(Rc Kshtt|j|tdddtdddtdddtdddgdd d d |dS( NtdiskFulltlabelsdisk full counttslabJournalCommitsRequestedscommits requested counttentriest labelPrefixtblockstjournalRR(RRRR R(R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR7s (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR6stPackerStatisticscBseZddZRS(RcKsAtt|j|tdtdtdgdd|dS(NtcompressedFragmentsWrittentcompressedBlocksWrittentcompressedFragmentsInPackerRR(RRRR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyREs   (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRDstSlabJournalStatisticscBseZddZRS(R"cKsYtt|j|tdtdtdtdtdgdddd |dS( Nt diskFullCountt flushCountt blockedCountt blocksWrittent tailBusyCountRs slab journalRR(RR"RR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRQs    (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR"PstSlabSummaryStatisticscBseZddZRS(R(cKs5tt|j|tdgdddd|dS(NR&Rs slab summaryRR(RR(RR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRas(R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR(`stRefCountsStatisticscBseZddZRS(R)cKs5tt|j|tdgdddd|dS(NR&Rt referenceRR(RR)RR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRis(R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR)hstBlockMapStatisticscBseZddZRS(R+cKstt|j|tdtdtdtdtdtdtdtdtd td td td td tdtdtdtdtdtdtdgdddd|dS(Nt dirtyPagest cleanPagest freePagest failedPagest incomingPagest outgoingPagest cachePressuret readCountt writeCountt failedReadst failedWritest reclaimedt readOutgoingt foundInCachetdiscardRequiredt waitForPaget fetchRequiredt pagesLoadedt pagesSavedR$Rs block mapRR(RR+Rt Uint32FieldR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRqs,                   (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR+pstHashLockStatisticscBseZddZRS(R@cKsJtt|j|tdtdtdtdgdd|dS(NtdedupeAdviceValidtdedupeAdviceStaletconcurrentDataMatchestconcurrentHashCollisionsRR(RR@RR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRs    (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyR@stErrorStatisticscBseZddZRS(REcKsAtt|j|tdtdtdgdd|dS(NtinvalidAdvicePBNCounttnoSpaceErrorCounttreadOnlyErrorCountRR(RRERR (R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRs   (R RR(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyREst VDOStatisticscBs#eZddZdZdZRS(RIc!Kstt|j|tdtdtdddtdddtdddtd td td d d ddtdd dddddtdd dddddtdddddtddtddddtdddddtdtddd td!td"d d#td$d d%td&dd d d'td(dttd)d d*dd+t d,t d-t d.t d/t d0td1td2td3td4gd5d6d7d8|dS(9NtversiontreleaseVersiontdataBlocksUsedt availables2((not $inRecoveryMode) and ($mode != 'read-only'))toverheadBlocksUsedsnot $inRecoveryModetlogicalBlocksUsedtphysicalBlockst logicalBlockst oneKBlocksRs 1K-blocksRs#$physicalBlocks * $blockSize / 1024toneKBlocksUseds1K-blocks useds;($dataBlocksUsed + $overheadBlocksUsed) * $blockSize / 1024toneKBlocksAvailables1K-blocks availablesM($physicalBlocks - $dataBlocksUsed - $overheadBlocksUsed) * $blockSize / 1024t usedPercentsLint((100 * ($dataBlocksUsed + $overheadBlocksUsed) / $physicalBlocks) + 0.5)tsavingstdisplaysjint(100 * ($logicalBlocksUsed - $dataBlocksUsed) / $logicalBlocksUsed) if ($logicalBlocksUsed > 0) else -1t savingPercents/$savings if ($savings >= 0) else NotAvailable()tblockMapCacheSizet writePolicytlengthit blockSizetcompleteRecoveriesscompleted recovery counttreadOnlyRecoveriessread-only recovery counttmodesoperating modetinRecoveryModetrecoveryPercentagesrecovery progress (%)s$inRecoveryModetpackert allocatorRt slabJournalt slabSummaryt refCountstblockMapthashLockterrorstprocFilet dedupe_statsRR(RRIRR?R t Uint8FieldtFalset StringFieldt BoolFieldRRRR"R(R)R+R@RE(R R R ((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRs@              icCsXtt|j|}|jdtjksE|jdtkrTtdn|S(NRJRKsVDOStatistics version mismatch(RRItsampletgetStattstatisticsVersiontCURRENT_RELEASE_VERSION_NUMBERt Exception(R tdeviceRp((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRps-(R RRRrRp(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyRIs 8N(t__doc__tFieldt StatStructtVDOReleaseVersionsRRRRR"R(R)R+R@RERI(((s@/usr/lib/python2.7/site-packages/vdo/statistics/VDOStatistics.pyts    .