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

Method test

extern/libcds/test/stress/stack/push.cpp:92–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91 template <typename Stack>
92 void test( Stack& stack )
93 {
94 cds_test::thread_pool& pool = get_pool();
95
96 pool.add( new Producer<Stack>( pool, stack ), s_nThreadCount );
97
98 size_t nStart = 0;
99 size_t nThreadItemCount = s_nStackSize / s_nThreadCount;
100 for ( size_t i = 0; i < pool.size(); ++i ) {
101 Producer<Stack>& thread = static_cast<Producer<Stack>&>( pool.get( i ));
102 thread.m_nStartItem = nStart;
103 nStart += nThreadItemCount;
104 thread.m_nEndItem = nStart;
105 }
106
107 propout() << std::make_pair( "thread_count", s_nThreadCount )
108 << std::make_pair( "push_count", s_nStackSize );
109
110 std::chrono::milliseconds duration = pool.run();
111
112 propout() << std::make_pair( "duration", duration );
113
114 analyze( stack );
115
116 propout() << stack.statistics();
117 }
118
119 template <typename Stack>
120 void test_elimination( Stack& stack )

Callers

nothing calls this directly

Calls 7

make_pairFunction · 0.85
analyzeFunction · 0.85
addMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
runMethod · 0.45
statisticsMethod · 0.45

Tested by

no test coverage detected