diff OrthancFramework/Sources/Cache/MemoryStringCache.cpp @ 5431:4be5f117aa0d

metrics
author Alain Mazy <am@osimis.io>
date Tue, 21 Nov 2023 10:32:42 +0100
parents 111e21b4f8bc
children 48b8dae6dc77
line wrap: on
line diff
--- a/OrthancFramework/Sources/Cache/MemoryStringCache.cpp	Mon Nov 20 17:01:48 2023 +0100
+++ b/OrthancFramework/Sources/Cache/MemoryStringCache.cpp	Tue Nov 21 10:32:42 2023 +0100
@@ -268,6 +268,20 @@
     }
 
     // Post-condition: "currentSize_ <= targetSize"
+  }
+
+  size_t MemoryStringCache::GetCurrentSize() const
+  {
+    boost::mutex::scoped_lock cacheLock(cacheMutex_);
+
+    return currentSize_;
+  }
+    
+  size_t MemoryStringCache::GetNumberOfItems() const
+  {
+    boost::mutex::scoped_lock cacheLock(cacheMutex_);
+    return content_.GetSize();
 
   }
+
 }