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

google / benchmark / 1052
92%

Build:
DEFAULT BRANCH: master
Ran 24 Jul 2017 11:16PM UTC
Jobs 2
Files 34
Run time 1244621min
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

pending completion
1052

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.

13 of 13 new or added lines in 1 file covered. (100.0%)

1401 of 1614 relevant lines covered (86.8%)

3377368.17 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1052.1 (COMPILER=g++ C_COMPILER=gcc BUILD_TYPE=Coverage) 24 Jul 2017 11:16PM UTC 0
86.8
Travis Job 1052.1
17 1052.17 (COMPILER=clang++ BUILD_TYPE=Release) 15 Nov 2019 07:33PM UTC 0
99.22
Travis Job 1052.17
Source Files on build 1052
  • List 0
  • Changed 10
  • Source Changed 1
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #1052
  • b9be142d on github
  • Prev Build on master (#1038)
  • Next Build on master (#1054)
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