comparison 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
comparison
equal deleted inserted replaced
3175:574890d14c92 3176:784bbb03fb54
293 293
294 buffer.Flatten(s); 294 buffer.Flatten(s);
295 } 295 }
296 296
297 297
298 void MetricsRegistry::SharedMetrics::Add(float delta)
299 {
300 boost::mutex::scoped_lock lock(mutex_);
301 value_ += delta;
302 registry_.SetValue(name_, value_);
303 }
304
305
298 void MetricsRegistry::Timer::Start() 306 void MetricsRegistry::Timer::Start()
299 { 307 {
300 if (registry_.IsEnabled()) 308 if (registry_.IsEnabled())
301 { 309 {
302 active_ = true; 310 active_ = true;