about summary refs log tree commit diff
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/aterm-map.cc36
-rw-r--r--src/libutil/aterm-map.hh4
2 files changed, 26 insertions, 14 deletions
diff --git a/src/libutil/aterm-map.cc b/src/libutil/aterm-map.cc
index e0cfefa2d5f4..60092382a2f3 100644
--- a/src/libutil/aterm-map.cc
+++ b/src/libutil/aterm-map.cc
@@ -213,6 +213,27 @@ unsigned int ATermMap::size()
 }
 
 
+#include <iostream>
+
+void printATermMapStats()
+{
+    cout << "RESIZES: " << nrResizes << " "
+         << sizeTotalAlloc << " "
+         << sizeCurAlloc << " "
+         << sizeMaxAlloc << endl;
+        
+    cout << "SET: "
+         << nrItemsSet << " "
+         << nrSetProbes << " "
+         << (double) nrSetProbes / nrItemsSet << endl;
+
+    cout << "GET: "
+         << nrItemsGet << " "
+         << nrGetProbes << " "
+         << (double) nrGetProbes / nrItemsGet << endl;
+}
+
+
 #if 0
 int main(int argc, char * * argv)
 {
@@ -294,19 +315,6 @@ int main(int argc, char * * argv)
         
     }
 
-    cout << "RESIZES: " << nrResizes << " "
-         << sizeTotalAlloc << " "
-         << sizeCurAlloc << " "
-         << sizeMaxAlloc << endl;
-        
-    cout << "SET: "
-         << nrItemsSet << " "
-         << nrSetProbes << " "
-         << (double) nrSetProbes / nrItemsSet << endl;
-
-    cout << "GET: "
-         << nrItemsGet << " "
-         << nrGetProbes << " "
-         << (double) nrGetProbes / nrItemsGet << endl;
+    printATermMapStats();
 }
 #endif
diff --git a/src/libutil/aterm-map.hh b/src/libutil/aterm-map.hh
index d7aed2ca21ac..6d13d7f9e0d1 100644
--- a/src/libutil/aterm-map.hh
+++ b/src/libutil/aterm-map.hh
@@ -111,4 +111,8 @@ private:
 };
 
 
+/* Hack. */
+void printATermMapStats();
+
+
 #endif /* !__ATERM_MAP_H */