diff OrthancServer/Sources/main.cpp @ 5493:b3ebe249ed5b pg-transactions

At startup, when using a database plugin, display the latency to access the DB
author Alain Mazy <am@osimis.io>
date Mon, 15 Jan 2024 18:25:08 +0100
parents 38f1d06875ad
children 3e02be2ccaee
line wrap: on
line diff
--- a/OrthancServer/Sources/main.cpp	Wed Jan 10 15:26:10 2024 +0100
+++ b/OrthancServer/Sources/main.cpp	Mon Jan 15 18:25:08 2024 +0100
@@ -1672,6 +1672,12 @@
     LOG(WARNING) << "The custom database back-end has *no* support for labels";
   }
 
+  if (database.GetDatabaseCapabilities().HasMeasureLatency())
+  {
+    LOG(WARNING) << "The DB latency is " << database.MeasureLatency() << " µs";
+  }
+
+
   bool success = ConfigureServerContext(database, storageArea, plugins, loadJobsFromDatabase);
 
   database.Close();