Skip to content

Instantly share code, notes, and snippets.

@welch
Created April 17, 2015 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save welch/8ace31194b91a9a86a8a to your computer and use it in GitHub Desktop.
Save welch/8ace31194b91a9a86a8a to your computer and use it in GitHub Desktop.
trend.change demo: estimating rate of change in a stream
import 'https://gist.githubusercontent.com/welch/b18d75bba184c441253c/raw/6b5b56d4677e416ef4a085fa6004f6f001ed1af9/sources.juttle' as sources;
import 'https://gist.githubusercontent.com/welch/6f2053f2bfc7d9e7b4d9/raw/b1e46167d05c7e49233db4613437283dcb1a3c4e/trend.juttle' as trend;
const start = :2014-01-01: ;
const dt = :60s: ;
sources.ripple_cpu -from start -to start + :1h:
| trend.change -in 'cpu' -dt dt -t0 start -out 'change'
| split
| @timechart -title "60s change" -display.dataDensity 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment