An API encapsulating for writing and querying counter sets.
Encapsulates key and value formation.
A representation of a timestamped performance counter value as stored in the
This package provides a persistence mechanism for performance
counters. Counters can be stored at a granularity of up to one
second and queried efficiently for a given time range,
granularity, and filtered path. For example, a query could
request the average value of
IOWAIT for all hosts
over the last 12 hours.
The counters are written into a BTree backed by a local file. The schema is:
[minute][path][timestamp] : valuewhere
minuteis the floor of the minute for the
timestampassociated with the counter value, where
pathis the fully qualified path of the counter, and where
valueis the datum reported for that counter value.
The keys can be easily compressed since many keys will share a common prefix. At the same time it is possible to store counters which are sampled more frequently than once per second. Finally, since the minutes appear first in the key, we can scan only the time range of interest. Of course, when scanning a large period of time we will still have to page through a lot of data.
When querying, we materialize a view of the time period at an appropriate granularity.
Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.