diff OrthancFramework/Sources/MetricsRegistry.cpp @ 5791:7fadeb395359 default

fixed incremented metrics that were not published + added orthanc_storage_cache_miss_count & orthanc_storage_cache_hit_count
author Alain Mazy <am@orthanc.team>
date Wed, 18 Sep 2024 10:38:02 +0200
parents f7adfb22e20e
children
line wrap: on
line diff
--- a/OrthancFramework/Sources/MetricsRegistry.cpp	Mon Sep 09 16:20:22 2024 +0200
+++ b/OrthancFramework/Sources/MetricsRegistry.cpp	Wed Sep 18 10:38:02 2024 +0200
@@ -139,6 +139,8 @@
 
       void Increment(const T& delta)
       {
+        time_ = GetNow();
+
         if (hasValue_)
         {
           value_ += delta;
@@ -146,6 +148,7 @@
         else
         {
           value_ = delta;
+          hasValue_ = true;
         }
       }