Module Import alias Import alias Import alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Str Expr Call NameLoad NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareGtE BinOpSub NameLoad NameLoad NameLoad body Break Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpSub NameLoad NameLoad AugAssignAdd NameStore NameLoad Assign NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore BinOpMult BinOpDiv NameLoad NameLoad Num Assign NameStore BinOpMult BinOpDiv NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call NameLoad Str AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num NameLoad Expr Call NameLoad Str Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call NameLoad
N/A N/A time N/A logging N/A random appmetrics metrics histogram N/A log N/A N/A logging getLogger benchmark N/A DURATION 30 N/A MIN_LATENCY 1 N/A MAX_LATENCY 15 N/A 
Microbenchmark used to measure library's overhead.
The benchmark works by emulating a process that gets requests continuously and handles them
with a latency choosen randomly between MIN_LATENCY and MAX_LATENCY milliseconds.
The idea is to emulate some kind of i/o bound worker such as a web worker that uses mostly a db.
 benchmark N/A N/A new_fun duration N/A N/A N/A name bench N/A N/A new_fun name N/A work_time 0.0 N/A overhead 0.0 N/A started_on N/A N/A time time N/A True N/A N/A now N/A N/A time time N/A N/A N/A now started_on duration N/A N/A N/A latency N/A N/A N/A random randint MIN_LATENCY MAX_LATENCY 1000.0 N/A N/A N/A time sleep latency N/A t1 N/A N/A time time N/A N/A N/A metrics notify name latency N/A t2 N/A N/A time time N/A overhead N/A t2 t1 N/A work_time latency N/A elapsed N/A N/A N/A time time started_on N/A metric_value N/A N/A metrics get name N/A N/A N/A metrics delete_metric name N/A N/A elapsed work_time overhead metric_value N/A report N/A N/A kind duration work_time overhead metric_value N/A N/A N/A overhead_pct N/A N/A overhead duration 100.0 N/A work_pct N/A N/A work_time duration 100.0 N/A N/A N/A log info %s: %.4fs over %.2fs (%.2fs work, %.2f%%) - %.4f%% with results %s kind overhead duration work_time work_pct overhead_pct metric_value N/A run N/A N/A kind new_fun duration N/A N/A N/A N/A N/A log info benchmarking %s for %s seconds kind duration N/A res N/A benchmark new_fun duration N/A N/A report kind res N/A benchmark_all N/A N/A N/A N/A N/A N/A run counter N/A metrics new_counter DURATION N/A N/A run histogram N/A metrics new_histogram DURATION N/A N/A run histogram-sliding time window N/A N/A N/A name N/A N/A N/A metrics new_histogram name N/A N/A histogram SlidingTimeWindowReservoir 5 DURATION N/A N/A run histogram-sliding window N/A N/A N/A name N/A N/A N/A metrics new_histogram name N/A N/A histogram SlidingWindowReservoir DURATION N/A N/A run histogram-exponentially decaying N/A N/A N/A name N/A N/A N/A metrics new_histogram name N/A N/A histogram ExponentialDecayingReservoir DURATION N/A N/A run meter N/A metrics new_meter DURATION N/A N/A N/A __name__ __main__ N/A N/A N/A N/A logging basicConfig level N/A logging INFO N/A N/A benchmark_all