Splitted up map_find_string test to reduce compiling time and memory requirements
[libcds.git] / tests / unit / map2 / map_insfind_int.cpp
1 //$$CDS-header$$
2
3 #include "map2/map_insfind_int.h"
4
5 namespace map2 {
6     CPPUNIT_TEST_SUITE_REGISTRATION( Map_InsFind_int );
7
8     size_t Map_InsFind_int::c_nMapSize = 1000000    ;  // map size
9     size_t Map_InsFind_int::c_nThreadCount = 4      ;  // count of insertion thread
10     size_t Map_InsFind_int::c_nMaxLoadFactor = 8    ;  // maximum load factor
11     bool   Map_InsFind_int::c_bPrintGCState = true;
12
13     void Map_InsFind_int::setUpParams( const CppUnitMini::TestCfg& cfg )
14     {
15         c_nThreadCount = cfg.getULong("ThreadCount", 0 );
16         c_nMapSize = cfg.getULong("MapSize", static_cast<unsigned long>(c_nMapSize));
17         c_nMaxLoadFactor = cfg.getULong("MaxLoadFactor", static_cast<unsigned long>(c_nMaxLoadFactor));
18         c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
19         if ( c_nThreadCount == 0 )
20             c_nThreadCount = cds::OS::topology::processor_count();
21     }
22
23     void Map_InsFind_int::myRun(const char *in_name, bool invert /*= false*/)
24     {
25         setUpParams( m_Cfg.get( "Map_InsFind_int" ));
26
27         run_MichaelMap(in_name, invert);
28         run_SplitList(in_name, invert);
29         run_SkipListMap(in_name, invert);
30         run_EllenBinTreeMap(in_name, invert);
31         run_BronsonAVLTreeMap(in_name, invert);
32         run_StripedMap(in_name, invert);
33         run_RefinableMap(in_name, invert);
34         run_CuckooMap(in_name, invert);
35         run_StdMap(in_name, invert);
36
37         endTestCase();
38     }
39
40     /*
41     CPPUNIT_TEST_SUITE( Map_InsFind_int )
42         CDSUNIT_TEST_MichaelMap
43         CDSUNIT_TEST_MichaelMap_nogc
44         CDSUNIT_TEST_SplitList
45         CDSUNIT_TEST_SplitList_nogc
46         CDSUNIT_TEST_SkipListMap
47         CDSUNIT_TEST_SkipListMap_nogc
48         CDSUNIT_TEST_EllenBinTreeMap
49         CDSUNIT_TEST_BronsonAVLTreeMap
50         CDSUNIT_TEST_StripedMap
51         CDSUNIT_TEST_RefinableMap
52         CDSUNIT_TEST_CuckooMap
53         CDSUNIT_TEST_StdMap
54     CPPUNIT_TEST_SUITE_END()
55     */
56 } // namespace map2