Module ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Assign NameStore Lambda arguments args defaults CompareIsNot NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Str Dict Str Str Str Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Str Num Num Num Str Num Num Str Num Str Num Num Num Num Str Num Str Num Num Num Num Num Num Num Str Str Str Num Str Num Num Str Num Num Num Num Str Num Num Num Num Num Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Str Num Num Num Str Num Num Str Num Str Num Num Num Num Str Num Str Num Num Num Num Num Num Num Str Str Str Num Str Num Num Str Num Num Num Num Str Num Num Num Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad 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 AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad 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 Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str decorator_list NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Str Str Str Str Str Str Str Str Str Dict Str Str Dict ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str Str ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str Num ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str Str Str Num ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str ListLoad Str ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str ListLoad Str ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str ListLoad Str ListLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str ListLoad Str Str ListLoad Call NameLoad Str Str Num NameLoad Call NameLoad Str Str Num NameLoad Dict Str Str Dict Str Str Str Str Num ListLoad Str Str Str Str ListLoad Call NameLoad Str Str Num NameLoad Call NameLoad Str Str Num NameLoad Call NameLoad Str Str Num NameLoad Call NameLoad Str Str Num NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword Dict keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr NameLoad For NameStore SubscriptLoad NameLoad Index Str body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad Call AttributeLoad NameLoad attr NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Str ListLoad Str Str Str Str Str Assign NameStore Dict Str Str Num Num Assign NameStore ListLoad Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Call NameLoad Str Num keyword Num keyword Str Assign NameStore Call NameLoad Str NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list 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 test run_only mock Mock mock patch call diamond.collector Collector redisstat RedisCollector run_only_if_redis_is_available N/A N/A func N/A N/A N/A Decorator for checking if python-redis is available.
    Note: this test will be silently skipped if python-redis is missing.
     N/A N/A N/A redis N/A N/A N/A ImportError N/A N/A redis None N/A pred N/A N/A N/A N/A N/A redis None N/A N/A run_only func pred N/A TestRedisCollector N/A CollectorTestCase N/A setUp N/A N/A self N/A N/A N/A config N/A get_collector_config RedisCollector N/A interval databases 1 1 N/A N/A self collector N/A RedisCollector config None N/A test_import N/A N/A self N/A N/A N/A N/A N/A self assertTrue RedisCollector N/A test_real_data N/A N/A self publish_mock N/A N/A N/A data_1 N/A pubsub_channels used_memory_peak_human bgrewriteaof_in_progress connected_slaves uptime_in_days multiplexing_api lru_clock last_save_time redis_version redis_git_sha1 gcc_version connected_clients keyspace_misses used_memory vm_enabled used_cpu_user_children used_memory_peak role total_commands_processed latest_fork_usec loading used_memory_rss total_connections_received pubsub_patterns aof_enabled used_cpu_sys used_memory_human used_cpu_sys_children blocked_clients used_cpu_user client_biggest_input_buf arch_bits mem_fragmentation_ratio expired_keys evicted_keys bgsave_in_progress client_longest_output_list mem_allocator process_id uptime_in_seconds changes_since_last_save redis_git_dirty keyspace_hits 0 700.71K 0 0 0 epoll 954113 1351718385 2.4.10 0 4.4.6 1 0 726144 0 0.00 717528 master 1 0 0 7254016 1 0 0 0.02 709.12K 0.00 0 0.00 0 64 9.99 0 0 0 0 jemalloc-2.2.5 3020 32 0 0 0 N/A data_2 N/A pubsub_channels used_memory_peak_human bgrewriteaof_in_progress connected_slaves uptime_in_days multiplexing_api lru_clock last_save_time redis_version redis_git_sha1 gcc_version connected_clients keyspace_misses used_memory vm_enabled used_cpu_user_children used_memory_peak role total_commands_processed latest_fork_usec loading used_memory_rss total_connections_received pubsub_patterns aof_enabled used_cpu_sys used_memory_human used_cpu_sys_children blocked_clients used_cpu_user client_biggest_input_buf arch_bits mem_fragmentation_ratio expired_keys evicted_keys bgsave_in_progress client_longest_output_list mem_allocator process_id uptime_in_seconds changes_since_last_save redis_git_dirty keyspace_hits 1 1700.71K 4 2 1 epoll 5954113 51351718385 2.4.10 0 4.4.6 100 670 1726144 0 2.00 1717528 master 19764 8 0 17254016 18764 0 0 0.05 1709.12K 0.09 8 0.09 40 64 0.99 0 0 0 0 jemalloc-2.2.5 3020 95732 759 0 5700 N/A patch_collector N/A N/A patch object RedisCollector _get_info N/A Mock return_value data_1 N/A patch_time N/A patch time.time N/A Mock return_value 10 N/A N/A N/A patch_collector 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_collector 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_collector N/A N/A patch object RedisCollector _get_info N/A Mock return_value data_2 N/A patch_time N/A patch time.time N/A Mock return_value 20 N/A N/A N/A patch_collector 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_collector stop N/A N/A N/A patch_time stop N/A metrics N/A 6379.process.uptime 6379.pubsub.channels 6379.slaves.connected 6379.process.connections_received 6379.clients.longest_output_list 6379.process.commands_processed 6379.last_save.changes_since 6379.memory.external_view 6379.memory.fragmentation_ratio 6379.last_save.time 6379.clients.connected 6379.clients.blocked 6379.pubsub.patterns 6379.cpu.parent.user 6379.last_save.time_since 6379.memory.internal_view 6379.cpu.parent.sys 6379.keyspace.misses 6379.keys.expired 6379.keys.evicted 6379.keyspace.hits 95732 1 2 18764 0 19764 759 17254016 0.99 51351718385 100 8 0 0.09 -51351718365 1726144 0.05 670 0 0 5700 N/A N/A N/A self assertPublishedMany publish_mock metrics 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 run_only_if_redis_is_available N/A N/A patch object Collector publish test_hostport_or_instance_config N/A N/A self publish_mock N/A N/A N/A testcases N/A default host_set port_set hostport_set instance_1_host instance_1_port instance_1_hostport instance_2 old_and_new N/A config calls N/A N/A N/A call 6379 localhost 6379 None N/A config calls N/A host myhost N/A N/A call 6379 myhost 6379 None N/A config calls N/A port 5005 N/A N/A call 5005 localhost 5005 None N/A config calls N/A host port megahost 5005 N/A N/A call 5005 megahost 5005 None N/A config calls N/A instances N/A nick@myhost N/A N/A call nick myhost 6379 None N/A config calls N/A instances N/A nick@:9191 N/A N/A call nick localhost 9191 None N/A config calls N/A instances N/A nick@host1:8765 N/A N/A call nick host1 8765 None N/A config calls N/A instances N/A foo@hostX bar@:1000 N/A N/A call foo hostX 6379 None N/A call bar localhost 1000 None N/A config calls N/A host port instances myhost 1234 N/A foo@hostX bar@:1000 hostonly :1234 N/A N/A call foo hostX 6379 None N/A call bar localhost 1000 None N/A call 6379 hostonly 6379 None N/A call 1234 localhost 1234 None N/A N/A testname data N/A N/A testcases items N/A N/A config N/A get_collector_config RedisCollector N/A data N/A config N/A collector N/A RedisCollector config None N/A mock N/A Mock return_value N/A name testname N/A patch_c N/A N/A patch object RedisCollector collect_instance mock N/A N/A N/A patch_c start N/A N/A N/A collector collect N/A N/A N/A patch_c stop N/A expected_call_count N/A len N/A data N/A calls N/A N/A N/A self assertEqual N/A mock call_count expected_call_count msg N/A [%s] mock.calls=%d != expected_calls=%d N/A testname N/A mock call_count expected_call_count N/A exp_call N/A data N/A calls N/A N/A N/A N/A mock assert_has_calls exp_call N/A run_only_if_redis_is_available N/A N/A patch object Collector publish test_key_naming_when_using_instances N/A N/A self publish_mock N/A N/A N/A config_data N/A instances N/A nick1@host1:1111 nick2@:2222 nick3@host3 nick4@host4:3333/@password bla N/A get_info_data N/A total_connections_received total_commands_processed 200 100 N/A expected_calls N/A N/A call nick1.process.connections_received 200 precision 0 metric_type GAUGE N/A call nick1.process.commands_processed 100 precision 0 metric_type GAUGE N/A call nick2.process.connections_received 200 precision 0 metric_type GAUGE N/A call nick2.process.commands_processed 100 precision 0 metric_type GAUGE N/A call nick3.process.connections_received 200 precision 0 metric_type GAUGE N/A call nick3.process.commands_processed 100 precision 0 metric_type GAUGE N/A call nick4.process.connections_received 200 precision 0 metric_type GAUGE N/A call nick4.process.commands_processed 100 precision 0 metric_type GAUGE N/A call 6379.process.connections_received 200 precision 0 metric_type GAUGE N/A call 6379.process.commands_processed 100 precision 0 metric_type GAUGE N/A config N/A get_collector_config RedisCollector config_data N/A collector N/A RedisCollector config None N/A patch_c N/A N/A patch object RedisCollector _get_info N/A Mock return_value get_info_data N/A N/A N/A patch_c start N/A N/A N/A collector collect N/A N/A N/A patch_c stop N/A N/A N/A self assertEqual N/A publish_mock call_count N/A len expected_calls N/A exp_call expected_calls N/A N/A N/A N/A publish_mock assert_has_calls exp_call N/A run_only_if_redis_is_available 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