• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

google / benchmark / 1052 / 17
92%
master: 92%

Build:
DEFAULT BRANCH: master
Ran 15 Nov 2019 07:33PM UTC
Files 3
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jul 2017 11:13PM UTC coverage: 99.225% (+12.5%) from 86.762%
COMPILER=clang++ BUILD_TYPE=Release

push

travis-ci

dominichamon
Json reporter: don't cast floating-point to int; adjust tooling (#426)

* Json reporter: passthrough fp, don't cast it to int; adjust tooling

Json output format is generally meant for further processing
using some automated tools. Thus, it makes sense not to
intentionally limit the precision of the values contained
in the report.

As it can be seen, FormatKV() for doubles, used %.2f format,
which was meant to preserve at least some of the precision.
However, before that function is ever called, the doubles
were already cast to the integer via RoundDouble()...

This is also the case for console reporter, where it makes
sense because the screen space is limited, and this reporter,
however the CSV reporter does output some( decimal digits.

Thus i can only conclude that the loss of the precision
was not really considered, so i have decided to adjust the
code of the json reporter to output the full fp precision.

There can be several reasons why that is the right thing
to do, the bigger the time_unit used, the greater the
precision loss, so i'd say any sort of further processing
(like e.g. tools/compare_bench.py does) is best done
on the values with most precision.

Also, that cast skewed the data away from zero, which
i think may or may not result in false- positives/negatives
in the output of tools/compare_bench.py

* Json reporter: FormatKV(double): address review note

* tools/gbench/report.py: skip benchmarks with different time units

While it may be useful to teach it to operate on the
measurements with different time units, which is now
possible since floats are stored, and not the integers,
but for now at least doing such a sanity-checking
is better than providing misinformation.

48 of 50 branches covered (96.0%)

128 of 129 relevant lines covered (99.22%)

13.41 hits per line

Source Files on job 1052.17 (COMPILER=clang++ BUILD_TYPE=Release)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1052
  • Travis Job 1052.17
  • b9be142d on github
  • Prev Job for COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage on master (#1038.1)
  • Next Job for COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage on master (#1054.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc