clox v0.2.0 Clox

Summary

Functions

Format a key into a format, defaulting to ISOz

Get a list of granularities supported

Determine if the key is frozen

Get a list of keys for a time. The returned keys are split into buckets based on the granularities (minute, ten minute, hour, day, week, month)

Get a range of keys given a granularity

Get a range of keys between two dates. The granularity will be derived based on steps

Functions

format(time, format \\ "{ISOz}")

Format a key into a format, defaulting to ISOz

granularities()

Get a list of granularities supported.

is_frozen?(time, now \\ DateTime.now())

Determine if the key is frozen.

keys_for_time(time \\ DateTime.now())

Get a list of keys for a time. The returned keys are split into buckets based on the granularities (minute, ten minute, hour, day, week, month).

These keys may be used to save a counter for a metric

range(begining, ending, granularity)

Get a range of keys given a granularity.

smart_range(begining, ending, steps \\ 20)

Get a range of keys between two dates. The granularity will be derived based on steps.