Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Dict Str Str Str Num Str Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr ListLoad TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num Return NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Assign NameStore Call NameLoad Str Call NameLoad keyword Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad keyword NameLoad Call AttributeLoad NameLoad attr NameLoad Str decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr
N/A test CollectorTestCase test get_collector_config test unittest mock Mock mock patch diamond.collector Collector diskusage DiskUsageCollector TestDiskUsageCollector N/A CollectorTestCase N/A setUp N/A N/A self N/A N/A N/A config N/A get_collector_config DiskUsageCollector N/A interval sector_size byte_unit 10 512 kilobyte N/A N/A self collector N/A DiskUsageCollector config None N/A test_config N/A N/A self N/A N/A N/A N/A N/A self assertFalse N/A N/A N/A self collector config N/A send_zero N/A test_import N/A N/A self N/A N/A N/A N/A N/A self assertTrue DiskUsageCollector N/A test_get_disk_statistics N/A N/A self N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture diskstats N/A open_mock N/A N/A patch_open start N/A result N/A N/A N/A self collector get_disk_statistics N/A N/A N/A patch_open stop N/A N/A N/A open_mock assert_called_once_with /proc/diskstats N/A N/A N/A self assertEqual N/A sorted N/A N/A result keys N/A N/A 8 0 N/A 8 1 N/A 8 16 N/A 8 17 N/A 8 32 N/A 8 33 N/A 8 48 N/A 8 49 N/A 9 0 N/A result N/A N/A patch os.access N/A Mock return_value True test_should_work_with_real_data N/A N/A self publish_mock N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_1 N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A N/A N/A self assertPublishedMany publish_mock N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_2 N/A patch_time N/A patch time.time N/A Mock return_value 20 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A metrics N/A N/A self getPickledResults test_should_work_with_real_data.pkl N/A N/A N/A self setDocExample collector N/A N/A N/A self collector __class__ __name__ metrics metrics defaultpath N/A N/A N/A self collector config N/A path N/A N/A N/A self assertPublishedMany publish_mock metrics N/A N/A patch os.access N/A Mock return_value True N/A N/A patch object Collector publish test_verify_supporting_vda_and_xvdb N/A N/A self publish_mock N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_1_vda_xvdb N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A N/A N/A self assertPublishedMany publish_mock N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_2_vda_xvdb N/A patch_time N/A patch time.time N/A Mock return_value 20 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A metrics N/A N/A self getPickledResults test_verify_supporting_vda_and_xvdb.pkl N/A N/A N/A self assertPublishedMany publish_mock metrics N/A N/A patch os.access N/A Mock return_value True N/A N/A patch object Collector publish test_verify_supporting_md_dm N/A N/A self publish_mock N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_1_md_dm N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A N/A N/A self assertPublishedMany publish_mock N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_2_md_dm N/A patch_time N/A patch time.time N/A Mock return_value 20 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A metrics N/A N/A self getPickledResults test_verify_supporting_md_dm.pkl N/A N/A N/A self assertPublishedMany publish_mock metrics N/A N/A patch os.access N/A Mock return_value True N/A N/A patch object Collector publish test_verify_supporting_disk N/A N/A self publish_mock N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_1_disk N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A N/A N/A self assertPublishedMany publish_mock N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_2_disk N/A patch_time N/A patch time.time N/A Mock return_value 20 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A metrics N/A N/A self getPickledResults test_verify_supporting_disk.pkl N/A N/A N/A self assertPublishedMany publish_mock metrics N/A N/A patch os.access N/A Mock return_value True N/A N/A patch object Collector publish test_service_Time N/A N/A self publish_mock N/A N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_1_service_time N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A N/A N/A self assertPublishedMany publish_mock N/A N/A patch_open N/A patch __builtin__.open N/A Mock return_value N/A N/A self getFixture proc_diskstats_2_service_time N/A patch_time N/A patch time.time N/A Mock return_value 70 N/A N/A N/A patch_open start N/A N/A N/A patch_time start N/A N/A N/A N/A self collector collect N/A N/A N/A patch_open stop N/A N/A N/A patch_time stop N/A metrics N/A N/A self getPickledResults test_service_Time.pkl N/A N/A N/A self assertPublishedMany publish_mock metrics N/A N/A patch os.access N/A Mock return_value True N/A N/A patch object Collector publish N/A N/A N/A __name__ __main__ N/A N/A N/A N/A unittest main