@@ -228,9 +228,9 @@ BenchmarkRunner::BenchmarkRunner(
228228 reports_for_family (reports_for_family_),
229229 parsed_benchtime_flag(ParseBenchMinTime(FLAGS_benchmark_min_time)),
230230 min_time(ComputeMinTime(b, parsed_benchtime_flag)),
231- min_rel_accuracy(!IsZero(b.min_rel_accuracy())
232- ? b.min_rel_accuracy()
233- : FLAGS_benchmark_min_rel_accuracy),
231+ min_rel_accuracy(!IsZero(b.min_rel_accuracy())
232+ ? b.min_rel_accuracy()
233+ : FLAGS_benchmark_min_rel_accuracy),
234234 min_warmup_time((!IsZero(b.min_time()) && b.min_warmup_time() > 0.0)
235235 ? b.min_warmup_time()
236236 : FLAGS_benchmark_min_warmup_time),
@@ -332,7 +332,8 @@ IterationCount BenchmarkRunner::PredictNumItersNeeded(
332332 multiplier = is_significant ? multiplier : 10.0 ;
333333
334334 if (!IsZero (GetMinRelAccuracy ())) {
335- multiplier = std::max (multiplier, GetRelAccuracy (i) * 1.4 / GetMinRelAccuracy ());
335+ multiplier =
336+ std::max (multiplier, GetRelAccuracy (i) * 1.4 / GetMinRelAccuracy ());
336337 }
337338
338339 // So what seems to be the sufficiently-large iteration count? Round up.
@@ -354,9 +355,10 @@ bool BenchmarkRunner::ShouldReportIterationResults(
354355 return i.results .skipped_ ||
355356 // Too many iterations already.
356357 i.iters >= kMaxIterations ||
357- // We have applied for enough time and the relative accuracy is good enough.
358- // Relative accuracy is checked only for user provided timers.
359- (HasSufficientTimeToApply (i) && (!b.use_manual_time () || HasSufficientRelAccuracy (i)));
358+ // We have applied for enough time and the relative accuracy is good
359+ // enough. Relative accuracy is checked only for user provided timers.
360+ (HasSufficientTimeToApply (i) &&
361+ (!b.use_manual_time () || HasSufficientRelAccuracy (i)));
360362}
361363
362364double BenchmarkRunner::GetMinTimeToApply () const {
@@ -369,19 +371,25 @@ double BenchmarkRunner::GetMinTimeToApply() const {
369371}
370372
371373double BenchmarkRunner::GetRelAccuracy (const IterationResults& i) const {
372- return std::sqrt (i.seconds_pow2 / i.iters - std::pow (i.seconds / i.iters , 2 .)) / (i.seconds / i.iters ) / sqrt (i.iters );
374+ return std::sqrt (i.seconds_pow2 / i.iters -
375+ std::pow (i.seconds / i.iters , 2 .)) /
376+ (i.seconds / i.iters ) / sqrt (i.iters );
373377}
374378
375- bool BenchmarkRunner::HasSufficientTimeToApply (const IterationResults& i) const {
379+ bool BenchmarkRunner::HasSufficientTimeToApply (
380+ const IterationResults& i) const {
376381 return i.seconds >= GetMinTimeToApply () ||
377382 // CPU time is specified but the elapsed real time greatly exceeds
378383 // the minimum time.
379384 // Note that user provided timers are except from this test.
380- (!b.use_manual_time () && i.results .real_time_used >= 5 * GetMinTimeToApply ());
385+ (!b.use_manual_time () &&
386+ i.results .real_time_used >= 5 * GetMinTimeToApply ());
381387}
382388
383- bool BenchmarkRunner::HasSufficientRelAccuracy (const IterationResults& i) const {
384- return (IsZero (GetMinRelAccuracy ()) || (GetRelAccuracy (i) <= GetMinRelAccuracy ()));
389+ bool BenchmarkRunner::HasSufficientRelAccuracy (
390+ const IterationResults& i) const {
391+ return (IsZero (GetMinRelAccuracy ()) ||
392+ (GetRelAccuracy (i) <= GetMinRelAccuracy ()));
385393}
386394
387395void BenchmarkRunner::FinishWarmUp (const IterationCount& i) {
0 commit comments