diff OrthancServer/Sources/ServerIndex.cpp @ 5430:b83192e7ad10

Now displaying timings when reading from/writing to disk in the verbose logs
author Alain Mazy <am@osimis.io>
date Mon, 20 Nov 2023 17:01:48 +0100
parents 03501a258d9e
children 9ffd6d18daf3
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerIndex.cpp	Fri Nov 17 13:56:13 2023 +0100
+++ b/OrthancServer/Sources/ServerIndex.cpp	Mon Nov 20 17:01:48 2023 +0100
@@ -36,8 +36,6 @@
 #include "ServerToolbox.h"
 
 
-static const uint64_t MEGA_BYTES = 1024 * 1024;
-
 namespace Orthanc
 {
   class ServerIndex::TransactionContext : public StatelessDatabaseOperations::ITransactionContext
@@ -402,7 +400,7 @@
       }
       else
       {
-        LOG(WARNING) << "At most " << (size / MEGA_BYTES) << "MB will be used for the storage area";
+        LOG(WARNING) << "At most " << Toolbox::GetHumanFileSize(size) << " will be used for the storage area";
       }
     }