From 8834c5c72447f7b8147ec34a4cb12e28c8906e90 Mon Sep 17 00:00:00 2001 From: Giacomo Pozzoni Date: Fri, 17 Jul 2020 22:52:01 +0000 Subject: Core/Metric: Log Map::Update() times (#25067) * Core/Metric: Log Map::Update() times * Add more performant version to reduce allocations when metrics are disabled * Linux build fix * Add metric stopwatch version that doesnt let users forget to _END it * Fix linux build * Code cleanup * Add Map updates panel to General dashboard * Add "Recent events" panel to General dashboard * Apply latest codestyle changes Co-authored-by: Shauren (cherry picked from commit 5eb742ee6a892b684b0c4cbde9f02f838b8300e5) --- src/common/Metric/Metric.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/Metric/Metric.cpp') diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp index b1302aacb5a..07db8e83f4d 100644 --- a/src/common/Metric/Metric.cpp +++ b/src/common/Metric/Metric.cpp @@ -279,6 +279,11 @@ std::string Metric::FormatInfluxDBTagValue(std::string const& value) return boost::replace_all_copy(value, " ", "\\ "); } +std::string Metric::FormatInfluxDBValue(std::chrono::nanoseconds value) +{ + return FormatInfluxDBValue(std::chrono::duration_cast(value).count()); +} + Metric::Metric() { } -- cgit v1.2.3