Module Expr Str Import alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias alias alias ImportFrom alias alias alias alias alias alias alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Dict Str Str Str Num Assign NameStore Num Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign NameStore Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Num keyword Num Assign AttributeStore NameLoad attr Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Num keyword Num Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad Str Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str While CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str While CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str keyword Num keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str keyword Num keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Num AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str keyword Num keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Num AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Num AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpMult BinOpDiv Call NameLoad BinOpSub NameLoad NameLoad BinOpDiv BinOpAdd NameLoad NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr For NameStore Call NameLoad Num body Assign NameStore Num While CompareLt NameLoad BinOpMult Num BinOpAdd NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad BinOpMult Num BinOpAdd NameLoad Num AugAssignAdd NameStore Num Assign NameStore BinOpMult Num BinOpAdd NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str keyword Num keyword NameLoad keyword Num Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Num AugAssignAdd NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call AttributeLoad NameLoad attr Num Assign NameStore Num While CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Num AugAssignAdd NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad NameLoad NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr BinOpSub Num BinOpMod Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad keyword Str keyword Num keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str keyword Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword Num attr NameLoad
N/A N/A 
Online utils test
 N/A unittest unittest TestCase mock MagicMock N/A time N/A redis N/A argparse scutils.redis_queue RedisQueue RedisPriorityQueue RedisStack scutils.stats_collector ThreadedCounter TimeWindow RollingTimeWindow Counter UniqueCounter HyperLogLogCounter BitMapCounter RedisMixin N/A object N/A __init__ N/A N/A self name redis_conn N/A N/A N/A N/A self redis_conn redis_conn N/A N/A N/A TestCase __init__ self name N/A N/A QueueMixin N/A RedisMixin object N/A N/A queue_class None setUp N/A N/A self N/A N/A N/A N/A self queue N/A N/A self queue_class N/A self redis_conn key N/A N/A TestRedisFifoQueue N/A QueueMixin TestCase N/A N/A queue_class RedisQueue test_fifo_queue N/A N/A self N/A N/A N/A item1 N/A stuff blah a 2 N/A item2 123 N/A item3 dohrayme N/A N/A N/A N/A self queue push item1 N/A N/A N/A N/A self queue push item2 N/A N/A N/A N/A self queue push item3 N/A N/A N/A self assertEqual item1 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item2 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item3 N/A N/A N/A self queue pop N/A N/A TestRedisPriorityQueue N/A QueueMixin TestCase N/A N/A queue_class RedisPriorityQueue test_priority_queue N/A N/A self N/A N/A N/A item1 N/A a b c N/A item2 123 N/A item3 dohrayme N/A N/A N/A N/A self queue push item1 3 N/A N/A N/A N/A self queue push item2 1 N/A N/A N/A N/A self queue push item3 2 N/A N/A N/A self assertEqual item1 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item3 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item2 N/A N/A N/A self queue pop N/A N/A TestRedisStack N/A QueueMixin TestCase N/A N/A queue_class RedisStack test_stack N/A N/A self N/A N/A N/A item1 N/A a b c N/A item2 123 N/A item3 dohrayme N/A N/A N/A N/A self queue push item1 N/A N/A N/A N/A self queue push item2 N/A N/A N/A N/A self queue push item3 N/A N/A N/A self assertEqual item3 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item2 N/A N/A N/A self queue pop N/A N/A N/A self assertEqual item1 N/A N/A N/A self queue pop N/A N/A TestStatsThreaded N/A RedisMixin TestCase N/A test_set_key N/A N/A self N/A N/A N/A tc N/A ThreadedCounter start_time 1442671176 N/A N/A N/A self assertEqual default_counter N/A N/A tc get_key N/A N/A tc roll True N/A N/A tc key myKey N/A N/A N/A tc _set_key N/A N/A N/A self assertEqual myKey:2015-09-19_13:59:36 N/A N/A tc get_key N/A test_is_expired N/A N/A self N/A N/A N/A tc N/A ThreadedCounter start_time 1442671176 window 5 N/A N/A tc _time N/A MagicMock return_value 1442671177 N/A N/A N/A self assertFalse N/A N/A tc is_expired N/A N/A tc _time N/A MagicMock return_value 1442671182 N/A N/A N/A self assertTrue N/A N/A tc is_expired N/A test_threading N/A N/A self N/A N/A N/A tc N/A ThreadedCounter start_time 1442671176 cycle_time 1 N/A N/A tc expire N/A MagicMock N/A N/A N/A tc setup redis_conn N/A self redis_conn N/A N/A N/A time sleep 1 N/A N/A N/A tc stop N/A test_purge_old N/A N/A self N/A N/A N/A tc N/A ThreadedCounter keep_max 1 N/A N/A tc keep_max 1 N/A N/A tc redis_conn N/A self redis_conn N/A N/A N/A N/A self redis_conn set default_counter:2015-09 stuff N/A N/A N/A N/A self redis_conn set default_counter:2015-10 stuff2 N/A N/A N/A tc purge_old N/A N/A N/A self assertEqual N/A default_counter:2015-10 N/A N/A N/A self redis_conn keys N/A N/A N/A tc get_key :* N/A N/A N/A N/A self redis_conn delete default_counter:2015-10 N/A tearDown N/A N/A self N/A N/A N/A keys N/A N/A N/A self redis_conn keys default_counter:* N/A N/A N/A len keys 0 N/A N/A key N/A N/A keys pop N/A N/A N/A N/A self redis_conn delete key N/A N/A CleanMixin N/A object N/A clean_keys N/A N/A self key N/A N/A N/A keys N/A N/A N/A self redis_conn keys N/A key * N/A N/A N/A len keys 0 N/A N/A key N/A N/A keys pop N/A N/A N/A N/A self redis_conn delete key N/A N/A TestStatsTimeWindow N/A RedisMixin TestCase CleanMixin N/A test_window N/A N/A self N/A N/A N/A counter N/A TimeWindow key test_key cycle_time 0.1 window 1 N/A N/A N/A counter setup N/A self redis_conn N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A time sleep 1.1 N/A N/A N/A counter increment N/A N/A N/A counter stop N/A N/A N/A self assertEqual N/A N/A counter value 3 N/A N/A N/A self clean_keys N/A counter key N/A test_roll_window N/A N/A self N/A N/A N/A counter N/A TimeWindow key test_key cycle_time 0.01 window 1 roll True N/A N/A N/A counter setup N/A self redis_conn N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A time sleep 1.5 N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A counter stop N/A keys N/A N/A N/A self redis_conn keys test_key:* N/A N/A N/A keys sort N/A N/A N/A self assertEqual N/A len keys 2 N/A N/A N/A self assertEqual N/A N/A N/A self redis_conn zcard N/A keys N/A 0 3 N/A N/A N/A self assertEqual N/A N/A counter value 2 N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A TestStatsRollingTimeWindow N/A RedisMixin TestCase CleanMixin N/A test_rolling_window N/A N/A self N/A N/A N/A N/A N/A time sleep N/A 5 N/A N/A int N/A N/A time time 5 N/A counter N/A RollingTimeWindow key test_key cycle_time 0.01 window 5 N/A N/A N/A counter setup N/A self redis_conn N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A time sleep 3 N/A N/A N/A counter increment N/A N/A N/A counter increment N/A N/A N/A time sleep 3 N/A N/A N/A counter increment N/A N/A N/A self assertEqual N/A N/A counter value 3 N/A N/A N/A time sleep 5.1 N/A N/A N/A self assertEqual N/A N/A counter value 0 N/A N/A N/A counter increment N/A N/A N/A self assertEqual N/A N/A counter value 1 N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A TestStatsCounter N/A RedisMixin TestCase CleanMixin N/A test_generic_counter N/A N/A self N/A N/A N/A counter N/A Counter key test_key N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A i 0 N/A N/A i 10000 N/A N/A N/A N/A counter increment N/A i 1 N/A N/A N/A self assertEqual 10000 N/A N/A counter value N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A test_roll_generic_counter N/A N/A self N/A N/A N/A N/A N/A time sleep N/A 2 N/A N/A int N/A N/A time time 2 N/A counter N/A Counter key test_key window 2 cycle_time 0.1 roll True N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A i 0 N/A N/A i 100 N/A N/A N/A N/A counter increment N/A i 1 N/A N/A N/A self assertEqual N/A N/A counter value 100 N/A N/A N/A time sleep 3 N/A i 0 N/A N/A i 50 N/A N/A N/A N/A counter increment N/A i 1 N/A N/A N/A self assertEqual N/A N/A counter value 50 N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A TestStatsUniqueCounter N/A RedisMixin TestCase CleanMixin N/A test_uniques N/A N/A self N/A N/A N/A counter N/A UniqueCounter key test_key N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A i 0 N/A N/A i 1000 N/A N/A N/A N/A counter increment N/A i 100 N/A i 1 N/A N/A N/A self assertEqual N/A N/A counter value 100 N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A test_roll_uniques N/A N/A self N/A N/A N/A N/A N/A time sleep N/A 2 N/A N/A int N/A N/A time time 2 N/A counter N/A UniqueCounter key test_key window 2 cycle_time 0.1 roll True N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A i 0 N/A N/A i 100 N/A N/A N/A N/A counter increment N/A i 10 N/A i 1 N/A N/A N/A self assertEqual N/A N/A counter value 10 N/A N/A N/A time sleep 3 N/A i 0 N/A N/A i 50 N/A N/A N/A N/A counter increment N/A i 10 N/A i 1 N/A N/A N/A self assertEqual N/A N/A counter value 10 N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A TestStatsHyperLogLogCounter N/A RedisMixin TestCase CleanMixin N/A N/A tolerance 2 get_percent_diff N/A N/A self value actual N/A N/A N/A N/A N/A N/A abs N/A actual value N/A N/A value actual 2.0 100.0 N/A test_hll_counter N/A N/A self N/A N/A N/A counter N/A HyperLogLogCounter key test_key N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A n N/A range 3 N/A N/A i 0 N/A N/A i N/A 10010 N/A n 1 N/A N/A N/A N/A counter increment N/A i N/A 5000 N/A n 1 N/A i 1 N/A value N/A 5000 N/A n 1 N/A actual N/A N/A counter value N/A diff N/A N/A self get_percent_diff value actual N/A N/A N/A self assertLessEqual diff N/A self tolerance N/A N/A N/A self clean_keys N/A counter key N/A N/A N/A counter stop N/A test_roll_hll_counter N/A N/A self N/A N/A N/A N/A N/A time sleep N/A 5.0 N/A N/A N/A time time 5.0 N/A counter N/A HyperLogLogCounter key test_key window 5 roll True cycle_time 0.1 N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A i 0 N/A N/A i 5010 N/A N/A N/A N/A counter increment N/A i 1010 N/A i 1 N/A value 1010 N/A actual N/A N/A counter value N/A diff N/A N/A self get_percent_diff value actual N/A N/A N/A self assertLessEqual diff N/A self tolerance N/A N/A N/A self clean_keys N/A counter key N/A N/A N/A time sleep N/A 5.0 N/A N/A N/A time time 5.0 N/A i 0 N/A N/A i 5010 N/A N/A N/A N/A counter increment N/A i 3010 N/A i 1 N/A value 3010 N/A actual N/A N/A counter value N/A diff N/A N/A self get_percent_diff value actual N/A N/A N/A self assertLessEqual diff N/A self tolerance N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A TestStatsBitMapCounter N/A RedisMixin TestCase CleanMixin N/A test_bitmap_counter N/A N/A self N/A N/A N/A counter N/A BitMapCounter key test_key N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A N/A N/A counter increment 0 N/A N/A N/A counter increment 1 N/A N/A N/A counter increment 5 N/A N/A N/A counter increment 0 N/A N/A N/A self assertEqual 3 N/A N/A counter value N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A test_roll_bitmap_counter N/A N/A self N/A N/A N/A N/A N/A time sleep N/A 2 N/A N/A int N/A N/A time time 2 N/A counter N/A BitMapCounter key test_key window 2 cycle_time 0.1 roll True N/A N/A N/A counter setup redis_conn N/A self redis_conn N/A N/A N/A counter increment 0 N/A N/A N/A counter increment 1 N/A N/A N/A counter increment 0 N/A N/A N/A self assertEqual 2 N/A N/A counter value N/A N/A N/A time sleep 3 N/A N/A N/A counter increment 0 N/A N/A N/A self assertEqual 1 N/A N/A counter value N/A N/A N/A counter stop N/A N/A N/A self clean_keys N/A counter key N/A N/A N/A N/A __name__ __main__ N/A N/A parser N/A N/A argparse ArgumentParser description Online deployment Test Script for Utils N/A N/A N/A parser add_argument -r --redis-host action store default localhost help The Redis host ip N/A N/A N/A parser add_argument -p --redis-port action store default 6379 help The Redis port N/A args N/A vars N/A N/A parser parse_args N/A redis_conn N/A N/A redis Redis host N/A args N/A redis_host port N/A args N/A redis_port N/A suite N/A N/A unittest TestSuite N/A N/A N/A suite addTest N/A TestStatsHyperLogLogCounter test_hll_counter redis_conn N/A N/A N/A suite addTest N/A TestStatsHyperLogLogCounter test_roll_hll_counter redis_conn N/A N/A N/A suite addTest N/A TestRedisFifoQueue test_fifo_queue redis_conn N/A N/A N/A suite addTest N/A TestRedisPriorityQueue test_priority_queue redis_conn N/A N/A N/A suite addTest N/A TestRedisStack test_stack redis_conn N/A N/A N/A suite addTest N/A TestStatsThreaded test_set_key redis_conn N/A N/A N/A suite addTest N/A TestStatsThreaded test_is_expired redis_conn N/A N/A N/A suite addTest N/A TestStatsThreaded test_threading redis_conn N/A N/A N/A suite addTest N/A TestStatsThreaded test_purge_old redis_conn N/A N/A N/A suite addTest N/A TestStatsTimeWindow test_window redis_conn N/A N/A N/A suite addTest N/A TestStatsTimeWindow test_roll_window redis_conn N/A N/A N/A suite addTest N/A TestStatsRollingTimeWindow test_rolling_window redis_conn N/A N/A N/A suite addTest N/A TestStatsCounter test_generic_counter redis_conn N/A N/A N/A suite addTest N/A TestStatsCounter test_roll_generic_counter redis_conn N/A N/A N/A suite addTest N/A TestStatsUniqueCounter test_uniques redis_conn N/A N/A N/A suite addTest N/A TestStatsUniqueCounter test_roll_uniques redis_conn N/A N/A N/A suite addTest N/A TestStatsBitMapCounter test_bitmap_counter redis_conn N/A N/A N/A suite addTest N/A TestStatsBitMapCounter test_roll_bitmap_counter redis_conn N/A N/A N/A N/A N/A unittest TextTestRunner verbosity 2 run suite