MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / test

Method test

extern/libcds/test/stress/stack/push_pop.cpp:163–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162 template <typename Stack>
163 void test( Stack& stack )
164 {
165 cds_test::thread_pool& pool = get_pool();
166 size_t const nPushCount = s_nStackSize / s_nPushThreadCount;
167
168 pool.add( new Producer<Stack>( pool, stack, nPushCount ), s_nPushThreadCount );
169 pool.add( new Consumer<Stack>( pool, stack ), s_nPopThreadCount );
170
171 s_nWorkingProducers.store( s_nPushThreadCount );
172 s_nStackSize = nPushCount * s_nPushThreadCount;
173
174 propout() << std::make_pair( "producer_thread_count", s_nPushThreadCount )
175 << std::make_pair( "consumer_thread_count", s_nPopThreadCount )
176 << std::make_pair( "push_count", s_nStackSize )
177;
178
179 std::chrono::milliseconds duration = pool.run();
180
181 propout() << std::make_pair( "duration", duration );
182
183 analyze( stack );
184
185 propout() << stack.statistics();
186 }
187
188 template <typename Stack>
189 void test_elimination( Stack& stack )

Callers

nothing calls this directly

Calls 6

make_pairFunction · 0.85
analyzeFunction · 0.85
addMethod · 0.45
storeMethod · 0.45
runMethod · 0.45
statisticsMethod · 0.45

Tested by

no test coverage detected