X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=test%2Fstress%2Fmap%2Finsdelfind%2Fmap_insdelfind.h;h=d11b835794bf0739129e221a043f5b9578401610;hp=dd909dc94f80c72a06527ba44a37b56fd0674b7d;hb=bf562cb028f023b2d49dd7dd45fcaa3f5ddb91f3;hpb=f7b18ec599eadb55ea2e8757ba12fcab12e9f708;ds=sidebyside diff --git a/test/stress/map/insdelfind/map_insdelfind.h b/test/stress/map/insdelfind/map_insdelfind.h index dd909dc9..d11b8357 100644 --- a/test/stress/map/insdelfind/map_insdelfind.h +++ b/test/stress/map/insdelfind/map_insdelfind.h @@ -38,6 +38,7 @@ namespace map { public: static size_t s_nMapSize; // initial map size static size_t s_nThreadCount; // thread count + static size_t s_nPassCount; // pass count static size_t s_nMaxLoadFactor; // maximum load factor static unsigned int s_nInsertPercentage; static unsigned int s_nDeletePercentage; @@ -127,7 +128,7 @@ namespace map { size_t const nNormalize = size_t(-1) / ( s_nMapSize * 2 ); size_t nRand = 0; - while ( !time_elapsed()) { + for (size_t pCount; pCount < s_nPassCount; pCount++) { nRand = cds::bitop::RandXorShift( nRand ); size_t n = nRand / nNormalize; switch ( s_arrShuffle[i] ) { @@ -190,7 +191,7 @@ namespace map { << std::make_pair( "delete_percentage", s_nDeletePercentage ) << std::make_pair( "map_size", s_nMapSize ); - std::chrono::milliseconds duration = pool.run( std::chrono::seconds( s_nDuration )); + std::chrono::milliseconds duration = pool.run(); propout() << std::make_pair( "duration", duration );