MCPcopy Create free account
hub / github.com/apache/trafficserver / estimate_clock_resolution

Function estimate_clock_resolution

lib/catch2/catch.hpp:7131–7138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7129 }
7130 template <typename Clock>
7131 EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_resolution(int iterations) {
7132 auto r = run_for_at_least<Clock>(std::chrono::duration_cast<ClockDuration<Clock>>(clock_resolution_estimation_time), iterations, &resolution<Clock>)
7133 .result;
7134 return {
7135 FloatDuration<Clock>(mean(r.begin(), r.end())),
7136 classify_outliers(r.begin(), r.end()),
7137 };
7138 }
7139 template <typename Clock>
7140 EnvironmentEstimate<FloatDuration<Clock>> estimate_clock_cost(FloatDuration<Clock> resolution) {
7141 auto time_limit = (std::min)(

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