Refactors some of existing cds multi-threaded stress test cases
[libcds.git] / test / stress / map / insdelfind / map_insdelfind.cpp
index ea0c970445da33f666c7196fa2ee1378706dafe1..830356e898311db3ec831f00b5ffd462555f8996 100644 (file)
@@ -34,6 +34,7 @@ namespace map {
 
     size_t Map_InsDelFind::s_nMapSize = 500000;
     size_t Map_InsDelFind::s_nThreadCount = 8;
+    size_t Map_InsDelFind::s_nPassCount = 100000;
     size_t Map_InsDelFind::s_nMaxLoadFactor = 8;
     unsigned int Map_InsDelFind::s_nInsertPercentage = 5;
     unsigned int Map_InsDelFind::s_nDeletePercentage = 5;
@@ -62,6 +63,10 @@ namespace map {
         if ( s_nThreadCount == 0 )
             s_nThreadCount = std::min( 16u, std::thread::hardware_concurrency() * 2 );
 
+        s_nPassCount = cfg.get_size_t( "PassCount", s_nPassCount );
+        if ( s_nPassCount == 0 )
+            s_nThreadCount = 1000;
+
         s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
         if ( s_nMaxLoadFactor == 0 )
             s_nMaxLoadFactor = 1;