#NEWLINE# @ patch ( 'diamond.collector.Collector.publish' ) #NEWLINE# def test_should_work_with_all_data( self , publish_mock ) : #NEWLINE# #INDENT# self . setUp ( [ ] ) #NEWLINE# TCPCollector . PROC = [ self . getFixturePath ( 'proc_net_netstat_1' ) , self . getFixturePath ( 'proc_net_snmp_1' ) ] #NEWLINE# self . collector . collect ( ) #NEWLINE# self . assertPublishedMany ( publish_mock , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# TCPCollector . PROC = [ self . getFixturePath ( 'proc_net_netstat_2' ) , self . getFixturePath ( 'proc_net_snmp_2' ) ] #NEWLINE# self . collector . collect ( ) #NEWLINE# metrics = { #NEWLINE# #INDENT# 'TCPMD5Unexpected' : 0.0 , #NEWLINE# 'ArpFilter' : 0.0 , #NEWLINE# 'TCPBacklogDrop' : 0.0 , #NEWLINE# 'TCPDSACKRecv' : 1580.0 , #NEWLINE# 'TCPDSACKIgnoredOld' : 292.0 , #NEWLINE# 'MaxConn' : ( - 1.0 ) , #NEWLINE# 'RcvPruned' : 0.0 , #NEWLINE# 'TCPSackMerged' : 1121.0 , #NEWLINE# 'OutOfWindowIcmps' : 10.0 , #NEWLINE# 'TCPDeferAcceptDrop' : 0.0 , #NEWLINE# 'TCPLossUndo' : 6538.0 , #NEWLINE# 'TCPHPHitsToUser' : 5667.0 , #NEWLINE# 'TCPTimeouts' : 15265.0 , #NEWLINE# 'TCPForwardRetrans' : 41.0 , #NEWLINE# 'TCPTSReorder' : 0.0 , #NEWLINE# 'RtoMin' : 0.0 , #NEWLINE# 'TCPAbortOnData' : 143.0 , #NEWLINE# 'TCPFullUndo' : 0.0 , #NEWLINE# 'TCPSackRecoveryFail' : 13.0 , #NEWLINE# 'InErrs' : 0.0 , #NEWLINE# 'TCPAbortOnClose' : 38916.0 , #NEWLINE# 'TCPAbortOnTimeout' : 68.0 , #NEWLINE# 'TCPFACKReorder' : 0.0 , #NEWLINE# 'LockDroppedIcmps' : 4.0 , #NEWLINE# 'RtoMax' : 0.0 , #NEWLINE# 'TCPSchedulerFailed' : 0.0 , #NEWLINE# 'EstabResets' : 0.0 , #NEWLINE# 'DelayedACKs' : 125491.0 , #NEWLINE# 'TCPSACKReneging' : 0.0 , #NEWLINE# 'PruneCalled' : 0.0 , #NEWLINE# 'OutRsts' : 0.0 , #NEWLINE# 'TCPRenoRecoveryFail' : 0.0 , #NEWLINE# 'TCPSackShifted' : 2356.0 , #NEWLINE# 'DelayedACKLocked' : 144.0 , #NEWLINE# 'TCPHPHits' : 10361792.0 , #NEWLINE# 'EmbryonicRsts' : 0.0 , #NEWLINE# 'TCPLossFailures' : 7.0 , #NEWLINE# 'TWKilled' : 0.0 , #NEWLINE# 'TCPSACKDiscard' : 0.0 , #NEWLINE# 'TCPAbortFailed' : 0.0 , #NEWLINE# 'TCPSackRecovery' : 364.0 , #NEWLINE# 'TCPDirectCopyFromBacklog' : 35660.0 , #NEWLINE# 'TCPFastRetrans' : 1184.0 , #NEWLINE# 'TCPPartialUndo' : 0.0 , #NEWLINE# 'TCPMinTTLDrop' : 0.0 , #NEWLINE# 'SyncookiesSent' : 0.0 , #NEWLINE# 'OutSegs' : 0.0 , #NEWLINE# 'TCPSackShiftFallback' : 3091.0 , #NEWLINE# 'RetransSegs' : 0.0 , #NEWLINE# 'IPReversePathFilter' : 0.0 , #NEWLINE# 'TCPRcvCollapsed' : 0.0 , #NEWLINE# 'TCPDSACKUndo' : 2448.0 , #NEWLINE# 'SyncookiesFailed' : 9.0 , #NEWLINE# 'TCPSACKReorder' : 0.0 , #NEWLINE# 'TCPDSACKOldSent' : 10175.0 , #NEWLINE# 'TCPAbortOnLinger' : 0.0 , #NEWLINE# 'TCPSpuriousRTOs' : 9.0 , #NEWLINE# 'TCPRenoRecovery' : 0.0 , #NEWLINE# 'TCPPrequeued' : 114232.0 , #NEWLINE# 'TCPLostRetransmit' : 7.0 , #NEWLINE# 'TCPLoss' : 188.0 , #NEWLINE# 'TCPHPAcks' : 12673896.0 , #NEWLINE# 'TCPDSACKOfoRecv' : 0.0 , #NEWLINE# 'TWRecycled' : 0.0 , #NEWLINE# 'TCPRenoFailures' : 0.0 , #NEWLINE# 'OfoPruned' : 0.0 , #NEWLINE# 'TCPMD5NotFound' : 0.0 , #NEWLINE# 'ActiveOpens' : 0.0 , #NEWLINE# 'TCPDSACKIgnoredNoUndo' : 1025.0 , #NEWLINE# 'TCPPrequeueDropped' : 0.0 , #NEWLINE# 'RtoAlgorithm' : 0.0 , #NEWLINE# 'TCPAbortOnMemory' : 0.0 , #NEWLINE# 'TCPTimeWaitOverflow' : 0.0 , #NEWLINE# 'TCPAbortOnSyn' : 0.0 , #NEWLINE# 'TCPDirectCopyFromPrequeue' : 19340531.0 , #NEWLINE# 'DelayedACKLost' : 10118.0 , #NEWLINE# 'PassiveOpens' : 0.0 , #NEWLINE# 'InSegs' : 1.0 , #NEWLINE# 'PAWSPassive' : 0.0 , #NEWLINE# 'TCPRenoReorder' : 0.0 , #NEWLINE# 'CurrEstab' : 3.0 , #NEWLINE# 'TW' : 89479.0 , #NEWLINE# 'AttemptFails' : 0.0 , #NEWLINE# 'PAWSActive' : 0.0 , #NEWLINE# 'ListenDrops' : 0.0 , #NEWLINE# 'SyncookiesRecv' : 0.0 , #NEWLINE# 'TCPDSACKOfoSent' : 0.0 , #NEWLINE# 'TCPSlowStartRetrans' : 2540.0 , #NEWLINE# 'TCPMemoryPressures' : 0.0 , #NEWLINE# 'PAWSEstab' : 0.0 , #NEWLINE# 'TCPSackFailures' : 502.0 , #NEWLINE# 'ListenOverflows' : 0.0 , #NEWLINE# 'TCPPureAcks' : 1003528.0 , #NEWLINE# #UNINDENT# } #NEWLINE# self . setDocExample ( collector = self . collector . __class__ . __name__ , metrics = metrics , defaultpath = self . collector . config [ 'path' ] ) #NEWLINE# self . assertPublishedMany ( publish_mock , self )