From: khizmax Date: Fri, 10 Mar 2017 20:08:01 +0000 (+0300) Subject: Minor stress-test change X-Git-Tag: v2.3.0~115 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9cbcfac0f845cb48db1b6372bad959302efefd7e;p=libcds.git Minor stress-test change --- diff --git a/test/stress/main.cpp b/test/stress/main.cpp index 8a60761a..c9bc90db 100644 --- a/test/stress/main.cpp +++ b/test/stress/main.cpp @@ -55,6 +55,8 @@ int main( int argc, char **argv ) // Read test config file cds_test::init_config( argc, argv ); + std::cout << "Hardware concurrency: " << std::thread::hardware_concurrency() << "\n"; + // Init Google test ::testing::InitGoogleTest( &argc, argv ); diff --git a/test/stress/map/insdelfind/map_insdelfind.cpp b/test/stress/map/insdelfind/map_insdelfind.cpp index 642abd24..68faa318 100644 --- a/test/stress/map/insdelfind/map_insdelfind.cpp +++ b/test/stress/map/insdelfind/map_insdelfind.cpp @@ -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 )