Skip to content

Commit

Permalink
Merged pull request influxdata#1032 from influxdata/nc-issue#327
Browse files Browse the repository at this point in the history
Adds support for windowing based on count
  • Loading branch information
nathanielc committed Nov 14, 2016
2 parents a34706e + c25a4ef commit 41738bd
Show file tree
Hide file tree
Showing 6 changed files with 797 additions and 95 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@

### Release Notes

This release introduces a new feature where you can window based off the number of points instead of their time.
For example:

```
stream
|from()
.measurement('my-measurement')
// Emit window for every 10 points with 100 points per window.
|window()
.periodCount(100)
.everyCount(10)
|mean('value')
|alert()
.crit(lambda: "mean" > 100)
.slack()
.channel('#alerts')
```

### Features

- [#327](https://github.com/influxdata/kapacitor/issues/327): You can now window based on count in addition to time.
- [#913](https://github.com/influxdata/kapacitor/issues/913): Add fillPeriod option to Window node, so that the first emit waits till the period has elapsed before emitting.
- [#898](https://github.com/influxdata/kapacitor/issues/898): Now when the Window node every value is zero, the window will be emitted immediately for each new point.

Expand Down
36 changes: 36 additions & 0 deletions integrations/data/TestStream_Window_Count.srpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
dbname
rpname
cpu,type=idle,host=serverA value=01 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=02 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=03 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=04 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=05 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=06 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=07 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=08 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=09 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=10 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=11 0000000000
dbname
rpname
cpu,type=idle,host=serverA value=12 0000000000
Loading

0 comments on commit 41738bd

Please sign in to comment.