formatting
[libcds.git] / test / stress / set / delodd / set_delodd.cpp
index b2d43292ae0d8c391f82230876441fab18fad9ce..f454f1270e6aa065014cf62a3e1f99ca3f022572 100644 (file)
@@ -1,7 +1,7 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
@@ -36,7 +36,9 @@ namespace set {
     size_t  Set_DelOdd::s_nInsThreadCount = 4;
     size_t  Set_DelOdd::s_nDelThreadCount = 4;
     size_t  Set_DelOdd::s_nExtractThreadCount = 4;
+    size_t  Set_DelOdd::s_nFindThreadCount = 2;
     size_t  Set_DelOdd::s_nMaxLoadFactor = 8;
+    size_t  Set_DelOdd::s_nInsertPassCount = 100;
 
     size_t  Set_DelOdd::s_nCuckooInitialSize = 1024;
     size_t  Set_DelOdd::s_nCuckooProbesetSize = 16;
@@ -63,11 +65,16 @@ namespace set {
 
         s_nDelThreadCount = cfg.get_size_t( "DelThreadCount", s_nDelThreadCount );
         s_nExtractThreadCount = cfg.get_size_t( "ExtractThreadCount", s_nExtractThreadCount );
+        s_nFindThreadCount = cfg.get_size_t( "FindThreadCount", s_nFindThreadCount );
 
         s_nMaxLoadFactor = cfg.get_size_t( "MaxLoadFactor", s_nMaxLoadFactor );
         if ( s_nMaxLoadFactor == 0 )
             s_nMaxLoadFactor = 1;
 
+        s_nInsertPassCount = cfg.get_size_t( "PassCount", s_nInsertPassCount );
+        if ( s_nInsertPassCount == 0 )
+            s_nInsertPassCount = 100;
+
         s_nCuckooInitialSize = cfg.get_size_t( "CuckooInitialSize", s_nCuckooInitialSize );
         if ( s_nCuckooInitialSize < 256 )
             s_nCuckooInitialSize = 256;
@@ -112,5 +119,13 @@ namespace set {
         return lf;
     }
 
-    INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors()) );
+#ifdef CDSTEST_GTEST_INSTANTIATE_TEST_CASE_P_HAS_4TH_ARG
+    static std::string get_test_parameter_name( testing::TestParamInfo<size_t> const& p )
+    {
+        return std::to_string( p.param );
+    }
+    INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors()), get_test_parameter_name );
+#else
+    INSTANTIATE_TEST_CASE_P( a, Set_DelOdd_LF, ::testing::ValuesIn( Set_DelOdd_LF::get_load_factors()));
+#endif
 } // namespace set