Module ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias Assign NameStore NameLoad FunctionDef arguments args defaults body Global identifier If UnaryOpNot NameLoad body Assign NameStore Call NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str Num NameLoad NameLoad Num body Expr Str Assign NameStore Call NameLoad Assign NameStore Num If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr Str BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareNotIn SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num ListLoad Str Str Str For NameStore NameLoad body Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num BinOpAdd NameLoad NameLoad If BoolOpAnd NameLoad CompareGtE Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Assign NameStore Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AugAssignAdd NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Str Num body Expr Str Assign NameStore Call NameLoad For NameStore Call AttributeLoad NameLoad attr Str BinOpSub Call AttributeLoad NameLoad attr Call NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list
N/A __future__ unicode_literals N/A random datetime datetime timedelta models R N/A _redis_model None get_r N/A N/A N/A N/A N/A _redis_model N/A N/A _redis_model N/A N/A _redis_model N/A R N/A _redis_model N/A set_metric N/A N/A slug value category expire date N/A None None None N/A N/A Create/Increment a metric. N/A N/A N/A N/A get_r set_metric slug value category category expire expire date date N/A metric N/A N/A slug num category expire date N/A 1 None None None N/A N/A Create/Increment a metric. N/A N/A N/A N/A get_r metric slug num num category category expire expire date date N/A gauge N/A N/A slug current_value N/A N/A N/A Set a value for a Gauge N/A N/A N/A N/A get_r gauge slug current_value N/A generate_test_metrics N/A N/A slug num randomize cap increment_value N/A test-metric 100 False None 100 N/A N/A Generate some dummy metrics for the given ``slug``.

    * ``slug`` -- the Metric slug
    * ``num`` -- Number of days worth of metrics (default is 100)
    * ``randomize`` -- Generate random metric values (default is False)
    * ``cap`` -- If given, cap the maximum metric value.
    * ``increment_value`` -- The amount by which we increment metrics on
      subsequent days. If ``randomize`` is True, this value is used to
      generate a ceiling for random values.

    NOTE: This only generates metrics for daily and larger granularities.

     N/A r N/A get_r N/A i 0 N/A randomize N/A N/A N/A N/A random seed N/A N/A N/A N/A r r sadd N/A r _metric_slugs_key slug N/A date N/A N/A r _date_range daily N/A N/A N/A datetime utcnow N/A timedelta days num N/A N/A keys N/A N/A r _build_keys slug date date N/A keys N/A k N/A k keys N/A N/A N/A N/A k split : N/A 2 N/A i s h N/A key keys N/A N/A value i N/A randomize N/A N/A value N/A N/A random randint 0 N/A i increment_value N/A N/A cap N/A N/A N/A N/A r r get key cap N/A N/A value 0 N/A N/A N/A N/A r r incr key value N/A i increment_value N/A delete_test_metrics N/A N/A slug num N/A test-metric 100 N/A N/A Deletes the metrics created by ``generate_test_metrics``. N/A r N/A get_r N/A date N/A N/A r _date_range daily N/A N/A N/A datetime utcnow N/A timedelta days num N/A N/A keys N/A N/A r _build_keys slug date date N/A N/A N/A N/A r r srem N/A r _metric_slugs_key slug N/A N/A N/A N/A r r delete keys N/A