Mercurial > hg > orthanc
diff Core/MetricsRegistry.cpp @ 3176:784bbb03fb54
new metrics: orthanc_rest_api_active_requests
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Jan 2019 18:07:41 +0100 |
parents | 574890d14c92 |
children | 596cfabd72c5 |
line wrap: on
line diff
--- a/Core/MetricsRegistry.cpp Tue Jan 29 17:34:09 2019 +0100 +++ b/Core/MetricsRegistry.cpp Tue Jan 29 18:07:41 2019 +0100 @@ -295,6 +295,14 @@ } + void MetricsRegistry::SharedMetrics::Add(float delta) + { + boost::mutex::scoped_lock lock(mutex_); + value_ += delta; + registry_.SetValue(name_, value_); + } + + void MetricsRegistry::Timer::Start() { if (registry_.IsEnabled())