MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / needsMoreIterations

Method needsMoreIterations

unittests/catch.hpp:5163–5174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5161 getResultCapture().benchmarkStarting( { m_name } );
5162 }
5163 auto BenchmarkLooper::needsMoreIterations() -> bool {
5164 auto elapsed = m_timer.getElapsedNanoseconds();
5165
5166 // Exponentially increasing iterations until we're confident in our timer resolution
5167 if( elapsed < m_resolution ) {
5168 m_iterationsToRun *= 10;
5169 return true;
5170 }
5171
5172 getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } );
5173 return false;
5174 }
5175
5176} // end namespace Catch
5177// end catch_benchmark.cpp

Callers

nothing calls this directly

Calls 2

getElapsedNanosecondsMethod · 0.80
benchmarkEndedMethod · 0.45

Tested by

no test coverage detected