Exemplo n.º 1
0
    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() );
    }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 void setUpParams( const CppUnitMini::TestCfg& cfg ) {
     s_nThreadCount = cfg.getULong("ThreadCount", 8 );
     s_nPassCount = cfg.getULong("PassCount", 1000000 );
 }
Exemplo n.º 4
0
 void setUpParams( const CppUnitMini::TestCfg& cfg )
 {
     s_nPassCount = cfg.getULong( "PassCount", 10 );
     s_nAllocPerPass = cfg.getULong( "AllocPerPass", 1024 ) * 1024 * 1024;
 }