Let the caller set a priority as the defaul, to enable them
to create a bunch at a given priority. This is just a
convenience.
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit
66f61eeda6a2465b5fc0e40a4f1300913db065dc)
assert(strlen(nick) <= 4);
}
data.nick = nick;
- data.prio = prio;
+ data.prio = prio ? prio : prio_default;
data.type = (enum perfcounter_type_d)ty;
data.histogram = std::move(histogram);
}
const char* nick = NULL,
int prio=0);
+ void set_prio_default(int prio_)
+ {
+ prio_default = prio_;
+ }
+
PerfCounters* create_perf_counters();
private:
PerfCountersBuilder(const PerfCountersBuilder &rhs);
unique_ptr<PerfHistogram<>> histogram = nullptr);
PerfCounters *m_perf_counters;
+
+ int prio_default = 0;
};
#endif