3 #include "map2/map_delodd.h"
6 CPPUNIT_TEST_SUITE_REGISTRATION( Map_DelOdd );
8 void Map_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg ) {
9 c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize );
10 c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount );
11 c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount );
12 c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount );
13 c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor );
14 c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true );
16 c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize );
17 c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize );
18 c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold );
20 c_nMultiLevelMap_HeadBits = cfg.getSizeT("MultiLevelMapHeadBits", c_nMultiLevelMap_HeadBits);
21 c_nMultiLevelMap_ArrayBits = cfg.getSizeT("MultiLevelMapArrayBits", c_nMultiLevelMap_ArrayBits);
23 if ( c_nInsThreadCount == 0 )
24 c_nInsThreadCount = cds::OS::topology::processor_count();
25 if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) {
26 c_nExtractThreadCount = cds::OS::topology::processor_count() / 2;
27 c_nDelThreadCount = cds::OS::topology::processor_count() - c_nExtractThreadCount;
30 m_arrInsert.resize( c_nMapSize );
31 m_arrRemove.resize( c_nMapSize );
32 for ( size_t i = 0; i < c_nMapSize; ++i ) {
36 shuffle( m_arrInsert.begin(), m_arrInsert.end() );
37 shuffle( m_arrRemove.begin(), m_arrRemove.end() );