MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / estimate_clock_resolution

Function estimate_clock_resolution

extlibs/catch/include/catch/catch.hpp:6907–6914  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6905 }
6906 template <typename Clock>
6907 EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {
6908 auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)
6909 .result;
6910 return {
6911 FloatDuration<Clock>(mean(r.begin(), r.end())),
6912 classify_outliers(r.begin(), r.end()),
6913 };
6914 }
6915 template <typename Clock>
6916 EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {
6917 auto time_limit = std::min(resolution * clock_cost_estimation_tick_limit, FloatDuration<Clock>(clock_cost_estimation_time_limit));

Callers

nothing calls this directly

Calls 4

meanFunction · 0.85
classify_outliersFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected