Add MultiLevelTimeSeries to folly.
authorStephen Chen <tracelog@fb.com>
Fri, 14 Jun 2013 22:46:44 +0000 (15:46 -0700)
committerJordan DeLong <jdelong@fb.com>
Wed, 26 Jun 2013 02:46:05 +0000 (19:46 -0700)
commit0600259d1e3a1109102b96a05508d0baa656f7c0
tree9f7614bb48c589ccaff4173b785ede8f4eec3e28
parentcdf9c435489fa6ffa85685c8316a5dd6d8c34db0
Add MultiLevelTimeSeries to folly.

Summary:
Add MultiLevelTimeSeries class which represents a timeseries which keeps several
levels of data granularity (similar in principle to the loads reported by the
UNIX 'uptime' command).  It uses several instances (one per level) of
BucketedTimeSeries as the underlying storage.

This can easily be used to track sums (and thus rates or averages) over several
predetermined time periods, as well as all-time sums.  For example, you would
use to it to track query rate or response speed over the last 5, 15, 30, and 60
minutes.

Test Plan: unittest included.

Reviewed By: simpkins@fb.com

FB internal diff: D851444
folly/stats/Instantiations.cpp
folly/stats/MultiLevelTimeSeries-defs.h [new file with mode: 0644]
folly/stats/MultiLevelTimeSeries.h [new file with mode: 0644]
folly/test/TimeseriesTest.cpp