diff Framework/Common/DatabaseManager.cpp @ 118:c9eb54785de6

integration OrthancMySQL-2.0 to mainline, to recover from commit in bad branch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 04 Feb 2019 16:21:59 +0100
parents 569e17419eae
children 260fc55f10cd 4cd7e45b671e
line wrap: on
line diff
--- a/Framework/Common/DatabaseManager.cpp	Wed Jan 23 20:14:41 2019 +0100
+++ b/Framework/Common/DatabaseManager.cpp	Mon Feb 04 16:21:59 2019 +0100
@@ -21,6 +21,8 @@
 
 #include "DatabaseManager.h"
 
+#include <Plugins/Samples/Common/OrthancPluginCppWrapper.h>
+
 #include <Core/Logging.h>
 #include <Core/OrthancException.h>
 
@@ -510,6 +512,18 @@
       }
         
       assert(statement_ != NULL);
+
+      /*
+        TODO - Sample code to monitor the execution time of each
+        cached statement, and publish it as an Orthanc metrics
+
+        #if HAS_ORTHANC_PLUGIN_METRICS == 1
+        std::string name = (std::string(location_.GetFile()) + "_" +
+        boost::lexical_cast<std::string>(location_.GetLine()));
+        OrthancPlugins::MetricsTimer timer(name.c_str());
+        #endif
+      */
+
       SetResult(GetTransaction().Execute(*statement_, parameters));
     }
     catch (Orthanc::OrthancException& e)