Minor stress-test change
authorkhizmax <libcds.dev@gmail.com>
Fri, 10 Mar 2017 20:08:01 +0000 (23:08 +0300)
committerkhizmax <libcds.dev@gmail.com>
Fri, 10 Mar 2017 20:08:01 +0000 (23:08 +0300)
test/stress/main.cpp
test/stress/map/insdelfind/map_insdelfind.cpp

index 8a60761a5a682a270949d640460ee4a97868273b..c9bc90db3197eabd4f4c00118ebf256f73ea24f1 100644 (file)
@@ -55,6 +55,8 @@ int main( int argc, char **argv )
         // Read test config file\r
         cds_test::init_config( argc, argv );\r
 \r
+        std::cout << "Hardware concurrency: " << std::thread::hardware_concurrency() << "\n";\r
+\r
         // Init Google test\r
         ::testing::InitGoogleTest( &argc, argv );\r
 \r
index 642abd2401d6577b6ad15f336271d419dd5a658f..68faa318120599415041bb7e2bc592df4c7b642c 100644 (file)
@@ -60,7 +60,7 @@ namespace map {
 
         s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
         if ( s_nThreadCount == 0 )
-            s_nThreadCount = std::thread::hardware_concurrency() * 2;
+            s_nThreadCount = std::min( 16u, std::thread::hardware_concurrency() * 2 );
 
         s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
         if ( s_nMaxLoadFactor == 0 )