diff --git a/src/ctracer/benchmark.cc b/src/ctracer/benchmark.cc index cc1156817c61f37ba8874977341c3a76bd9c4ea8..6a80f73a0ae6836663767e6d95dff25a8f27ef83 100644 --- a/src/ctracer/benchmark.cc +++ b/src/ctracer/benchmark.cc @@ -66,7 +66,7 @@ double ct::benchmark_results::seconds_per_sample(float percentile) const auto exp = experiments; // copy std::nth_element(exp.begin(), exp.begin() + n, exp.end(), comp_by_seconds); auto const t = exp[n]; - return t.seconds / t.samples; + return t.seconds / static_cast<double>(t.samples); } double ct::benchmark_results::cycles_per_sample(float percentile) const @@ -78,7 +78,7 @@ double ct::benchmark_results::cycles_per_sample(float percentile) const auto exp = experiments; // copy std::nth_element(exp.begin(), exp.begin() + n, exp.end(), comp_by_cycles); auto const t = exp[n]; - return t.cycles / t.samples; + return t.cycles / static_cast<double>(t.samples); } double ct::benchmark_results::baseline_seconds_per_sample() const