square / metrics

Metrics Query Engine
Apache License 2.0
170 stars 21 forks source link

Filter Threshold & Filter Count Functions #256

Closed Nathan-Fenner closed 8 years ago

Nathan-Fenner commented 8 years ago

Threshold Filtering

You can now say:

select
cpu | filter.mean_above(25, 1hr)

to select all CPU timeseries whose mean in the last hour is above 25. Or, just

select
cpu | filter.mean_above(25)

to only use the currently queried time interval.

This is a breaking change!

Instead of having both functions

filter.highest_max(series, count)
filter.recent_highest_max( series, count, duration )

this PR replaces them with the new definition for filter.highest_max:

filter.highest_max( series, count [, duration] )

which now acts as both versions.

@drcapulet @syamp

drcapulet commented 8 years ago

LGTM