From: Steinar H. Gunderson Date: Thu, 8 Jun 2017 22:31:11 +0000 (+0200) Subject: Prefix all metrics with nageru_ automatically. X-Git-Tag: 1.6.1~75 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=a8f728562f8f9aa3ec3cd6317688e98c5a7b98e9 Prefix all metrics with nageru_ automatically. --- diff --git a/metrics.cpp b/metrics.cpp index 4755ba0..78f1e98 100644 --- a/metrics.cpp +++ b/metrics.cpp @@ -28,10 +28,10 @@ string Metrics::serialize() const lock_guard lock(mu); for (const auto &key_and_value : int_metrics) { - ss << key_and_value.first.c_str() << " " << key_and_value.second->load() << "\n"; + ss << "nageru_" << key_and_value.first.c_str() << " " << key_and_value.second->load() << "\n"; } for (const auto &key_and_value : double_metrics) { - ss << key_and_value.first.c_str() << " " << key_and_value.second->load() << "\n"; + ss << "nageru_" << key_and_value.first.c_str() << " " << key_and_value.second->load() << "\n"; } return ss.str(); diff --git a/mixer.cpp b/mixer.cpp index 3547f01..4b45b51 100644 --- a/mixer.cpp +++ b/mixer.cpp @@ -390,9 +390,9 @@ Mixer::Mixer(const QSurfaceFormat &format, unsigned num_cards) set_output_card_internal(global_flags.output_card); } - global_metrics.register_int_metric("nageru_num_frames", &metrics_num_frames); - global_metrics.register_int_metric("nageru_dropped_frames", &metrics_dropped_frames); - global_metrics.register_double_metric("nageru_uptime", &metrics_uptime); + global_metrics.register_int_metric("num_frames", &metrics_num_frames); + global_metrics.register_int_metric("dropped_frames", &metrics_dropped_frames); + global_metrics.register_double_metric("uptime", &metrics_uptime); } Mixer::~Mixer()