diff OrthancServer/Plugins/Engine/OrthancPlugins.cpp @ 5337:b376abae664a

Metrics can be stored either as floating-point numbers, or as integers
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Jun 2023 17:55:09 +0200
parents f5cb6310e0dc
children 3c8286e5d07b 0e5e675b9750
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Jun 27 15:56:04 2023 +0200
+++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Tue Jun 27 17:55:09 2023 +0200
@@ -5299,8 +5299,7 @@
 
         {
           PImpl::ServerContextLock lock(*pimpl_);
-          lock.GetContext().GetMetricsRegistry().SetValue(p.name, boost::math::llround(p.value),
-                                                          Plugins::Convert(p.type));
+          lock.GetContext().GetMetricsRegistry().SetFloatValue(p.name, p.value, Plugins::Convert(p.type));
         }
 
         return true;
@@ -5313,7 +5312,7 @@
 
         {
           PImpl::ServerContextLock lock(*pimpl_);
-          lock.GetContext().GetMetricsRegistry().SetValue(p.name, p.value, Plugins::Convert(p.type));
+          lock.GetContext().GetMetricsRegistry().SetIntegerValue(p.name, p.value, Plugins::Convert(p.type));
         }
 
         return true;