perfcounters: add u64 average type

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-08-14 14:31:38 -07:00
parent 1eea43db19
commit 2f3e03f605
2 changed files with 6 additions and 0 deletions

View File

@ -283,6 +283,11 @@ void PerfCountersBuilder::add_u64(int idx, const char *name)
add_impl(idx, name, PERFCOUNTER_U64);
}
void PerfCountersBuilder::add_u64_avg(int idx, const char *name)
{
add_impl(idx, name, PERFCOUNTER_U64 | PERFCOUNTER_LONGRUNAVG);
}
void PerfCountersBuilder::add_fl(int idx, const char *name)
{
add_impl(idx, name, PERFCOUNTER_FLOAT);

View File

@ -169,6 +169,7 @@ public:
~PerfCountersBuilder();
void add_u64(int key, const char *name);
void add_u64_counter(int key, const char *name);
void add_u64_avg(int key, const char *name);
void add_fl(int key, const char *name);
void add_fl_avg(int key, const char *name);
PerfCounters* create_perf_counters();