X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2Fstress%2Fmap%2Finsdelfind%2Fmap_insdelfind.cpp;h=ea0c970445da33f666c7196fa2ee1378706dafe1;hb=9bcb21890d7175dcc634120dac455516fa35dadd;hp=3dcea79bf0d96334c11071cfd3e8ac5b8b4e0baf;hpb=40e34e6d0b104b6f5aff506ad67d43fd410e52bc;p=libcds.git diff --git a/test/stress/map/insdelfind/map_insdelfind.cpp b/test/stress/map/insdelfind/map_insdelfind.cpp index 3dcea79b..ea0c9704 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 ) @@ -130,5 +130,14 @@ namespace map { return lf; } +#ifdef CDSTEST_GTEST_INSTANTIATE_TEST_CASE_P_HAS_4TH_ARG + static std::string get_test_parameter_name( testing::TestParamInfo const& p ) + { + return std::to_string( p.param ); + } + INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors()), get_test_parameter_name ); +#else INSTANTIATE_TEST_CASE_P( a, Map_InsDelFind_LF, ::testing::ValuesIn( Map_InsDelFind_LF::get_load_factors())); +#endif + } // namespace map