void Set_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nSetSize = cfg.getSizeT("MapSize", c_nSetSize ); c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount); c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount); c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true ); c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize ); c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize ); c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold ); c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits); c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits); if ( c_nInsThreadCount == 0 ) c_nInsThreadCount = std::thread::hardware_concurrency(); if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) { c_nExtractThreadCount = std::thread::hardware_concurrency() / 2; c_nDelThreadCount = std::thread::hardware_concurrency() - c_nExtractThreadCount; } m_arrData.resize( c_nSetSize ); for ( size_t i = 0; i < c_nSetSize; ++i ) m_arrData[i] = i; shuffle( m_arrData.begin(), m_arrData.end() ); }
void Map_InsDel_int::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount ); c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount ); c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount ); c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize ); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); c_nCuckooInitialSize = cfg.getULong("CuckooInitialSize", static_cast<unsigned long>(c_nCuckooInitialSize) ); c_nCuckooProbesetSize = cfg.getULong("CuckooProbesetSize", static_cast<unsigned long>(c_nCuckooProbesetSize) ); c_nCuckooProbesetThreshold = cfg.getULong("CuckooProbesetThreshold", static_cast<unsigned long>(c_nCuckooProbesetThreshold) ); c_nFeldmanMap_HeadBits = cfg.getULong("FeldmanMapHeadBits", static_cast<unsigned long>(c_nFeldmanMap_HeadBits) ); c_nFeldmanMap_ArrayBits = cfg.getULong("FeldmanMapArrayBits", static_cast<unsigned long>(c_nFeldmanMap_ArrayBits) ); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState ); if ( c_nInsertThreadCount == 0 ) c_nInsertThreadCount = cds::OS::topology::processor_count(); if ( c_nDeleteThreadCount == 0 ) c_nDeleteThreadCount = cds::OS::topology::processor_count(); m_arrValues.clear(); m_arrValues.reserve( c_nMapSize ); for ( size_t i = 0; i < c_nMapSize; ++i ) m_arrValues.push_back( i ); shuffle( m_arrValues.begin(), m_arrValues.end() ); }
void Map_DelOdd::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize ); c_nInsThreadCount = cfg.getSizeT("InsThreadCount", c_nInsThreadCount ); c_nDelThreadCount = cfg.getSizeT("DelThreadCount", c_nDelThreadCount ); c_nExtractThreadCount = cfg.getSizeT("ExtractThreadCount", c_nExtractThreadCount ); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true ); c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize ); c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize ); c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold ); c_nFeldmanMap_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanMap_HeadBits); c_nFeldmanMap_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanMap_ArrayBits); if ( c_nInsThreadCount == 0 ) c_nInsThreadCount = cds::OS::topology::processor_count(); if ( c_nDelThreadCount == 0 && c_nExtractThreadCount == 0 ) { c_nExtractThreadCount = cds::OS::topology::processor_count() / 2; c_nDelThreadCount = cds::OS::topology::processor_count() - c_nExtractThreadCount; } m_arrInsert.resize( c_nMapSize ); m_arrRemove.resize( c_nMapSize ); for ( size_t i = 0; i < c_nMapSize; ++i ) { m_arrInsert[i] = i; m_arrRemove[i] = i; } shuffle( m_arrInsert.begin(), m_arrInsert.end()); shuffle( m_arrRemove.begin(), m_arrRemove.end()); }
void setUpParams( const CppUnitMini::TestCfg& cfg ) { s_nPassCount = cfg.getULong( "PassCount", 1000 ); s_nBlockCount = cfg.getULong( "BlockCount", 10000 ); s_nMinBlockSize = cfg.getULong( "MinBlockSize", 16 ); s_nMaxBlockSize = cfg.getULong( "MaxBlockSize", 1024 ); s_nMaxThreadCount = cfg.getUInt( "MaxThreadCount", 32 ); if ( s_nMaxThreadCount == 0 ) s_nMaxThreadCount = cds::OS::topology::processor_count() * 2; }
void Map_InsDel_string::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nInsertThreadCount = cfg.getSizeT("InsertThreadCount", c_nInsertThreadCount ); c_nDeleteThreadCount = cfg.getSizeT("DeleteThreadCount", c_nDeleteThreadCount ); c_nThreadPassCount = cfg.getSizeT("ThreadPassCount", c_nThreadPassCount ); c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize ); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState ); c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize); c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize); c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold); c_nFeldmanMap_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanMap_HeadBits); c_nFeldmanMap_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanMap_ArrayBits); if ( c_nInsertThreadCount == 0 ) c_nInsertThreadCount = std::thread::hardware_concurrency(); if ( c_nDeleteThreadCount == 0 ) c_nDeleteThreadCount = std::thread::hardware_concurrency(); }
void Map_find_string::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount ); c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize ); c_nPercentExists = cfg.getSizeT("PercentExists", c_nPercentExists ); c_nPassCount = cfg.getSizeT("PassCount", c_nPassCount ); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", true ); }
void setUpParams( const CppUnitMini::TestCfg& cfg ) { s_nThreadCount = cfg.getULong("ThreadCount", 8 ); s_nPassCount = cfg.getULong("PassCount", 1000000 ); }
void setUpParams( const CppUnitMini::TestCfg& cfg ) { s_nPassCount = cfg.getULong( "PassCount", 10 ); s_nAllocPerPass = cfg.getULong( "AllocPerPass", 1024 ) * 1024 * 1024; }
void Set_InsDelFind::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nSetSize = cfg.getSizeT("InitialMapSize", c_nSetSize ); c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount ); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor ); c_nInsertPercentage = cfg.getUInt("InsertPercentage", c_nInsertPercentage ); c_nDeletePercentage = cfg.getUInt("DeletePercentage", c_nDeletePercentage ); c_nDuration = cfg.getUInt("Duration", c_nDuration ); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState ); c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize ); c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize ); c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold ); c_nFeldmanSet_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanSet_HeadBits); c_nFeldmanSet_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanSet_ArrayBits); if ( c_nThreadCount == 0 ) c_nThreadCount = std::thread::hardware_concurrency(); CPPUNIT_ASSERT( c_nInsertPercentage + c_nDeletePercentage <= 100 ); actions * pFirst = m_arrShuffle; actions * pLast = m_arrShuffle + c_nInsertPercentage; std::fill( pFirst, pLast, do_insert ); pFirst = pLast; pLast += c_nDeletePercentage; std::fill( pFirst, pLast, do_delete ); pFirst = pLast; pLast = m_arrShuffle + sizeof(m_arrShuffle)/sizeof(m_arrShuffle[0]); std::fill( pFirst, pLast, do_find ); shuffle( m_arrShuffle, pLast ); }
void Map_find_string::setUpParams( const CppUnitMini::TestCfg& cfg ) { c_nThreadCount = cfg.getSizeT("ThreadCount", c_nThreadCount ); c_nMapSize = cfg.getSizeT("MapSize", c_nMapSize); c_nPercentExists = cfg.getSizeT("PercentExists", c_nPercentExists); c_nPassCount = cfg.getSizeT("PassCount", c_nPassCount); c_nMaxLoadFactor = cfg.getSizeT("MaxLoadFactor", c_nMaxLoadFactor); c_bPrintGCState = cfg.getBool("PrintGCStateFlag", c_bPrintGCState ); c_nCuckooInitialSize = cfg.getSizeT("CuckooInitialSize", c_nCuckooInitialSize); c_nCuckooProbesetSize = cfg.getSizeT("CuckooProbesetSize", c_nCuckooProbesetSize); c_nCuckooProbesetThreshold = cfg.getSizeT("CuckooProbesetThreshold", c_nCuckooProbesetThreshold); c_nFeldmanMap_HeadBits = cfg.getSizeT("FeldmanMapHeadBits", c_nFeldmanMap_HeadBits); c_nFeldmanMap_ArrayBits = cfg.getSizeT("FeldmanMapArrayBits", c_nFeldmanMap_ArrayBits); if ( c_nThreadCount == 0 ) c_nThreadCount = std::thread::hardware_concurrency(); CPPUNIT_MSG( "Generating test data...\n"); cds::OS::Timer timer; generateSequence(); CPPUNIT_MSG( " Duration=" << timer.duration() << "\n" ); }