Added HP/DHP internal stats to test
[libcds.git] / test / stress / framework / stress_test.cpp
index 1497cc7d9cabab249e540566ce1a642a3d351dc6..2cd19db3c9f7ef345cb91c0eb1a758e9c599c68c 100644 (file)
 #include <iostream>\r
 #include <cds_test/stress_test.h>\r
 \r
+#ifdef CDS_ENABLE_HPSTAT\r
+#   include <cds_test/stat_hp_out.h>\r
+#   include <cds_test/stat_dhp_out.h>\r
+#endif\r
+\r
 namespace cds_test {\r
 \r
     static std::string s_stat_prefix( "stat" );\r
@@ -55,6 +60,23 @@ namespace cds_test {
         return s_prop_stream;\r
     }\r
 \r
+    /*static*/ void stress_fixture::print_hp_stat()\r
+    {\r
+#ifdef CDS_ENABLE_HPSTAT\r
+        {\r
+            cds::gc::HP::stat st;\r
+            cds::gc::HP::statistics( st );\r
+            propout() << st;\r
+        }\r
+        {\r
+            cds::gc::DHP::stat st;\r
+            cds::gc::DHP::statistics( st );\r
+            propout() << st;\r
+        }\r
+#endif\r
+    }\r
+\r
+\r
     /*static*/ std::vector<std::string> stress_fixture::load_dictionary()\r
     {\r
         std::vector<std::string> arrString;\r