aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric/Metric.cpp
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-07-17 22:52:01 +0000
committerGitHub <noreply@github.com>2020-07-18 00:52:01 +0200
commit5eb742ee6a892b684b0c4cbde9f02f838b8300e5 (patch)
tree250ca7dfcedb07fc35636446340861c7955f110d /src/common/Metric/Metric.cpp
parent83e0a1b9443ee2bc46ef031eb24d6909257ba5c6 (diff)
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 <shauren.trinity@gmail.com>
Diffstat (limited to 'src/common/Metric/Metric.cpp')
-rw-r--r--src/common/Metric/Metric.cpp5
1 files changed, 5 insertions, 0 deletions
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<std::chrono::milliseconds>(value).count());
+}
+
Metric::Metric()
{
}