bobheadxi / gobenchdata

📉 Run Go benchmarks, publish results to an interactive web app, and check for performance regressions in your pull requests
https://gobenchdata.bobheadxi.dev
MIT License
142 stars 14 forks source link

bench: evaluate mem.BytesPerOp, mem.AllocsPerOp as float64 #58

Closed bobheadxi closed 2 years ago

bobheadxi commented 2 years ago

Fixes issue with BytesPerOp checks evaluating incorrectly as reported in https://github.com/bobheadxi/gobenchdata/issues/57 by representing mem.BytesPerOp, mem.AllocsPerOp as float64

Details: This is related to https://github.com/antonmedv/expr/issues/77 , which is caused by how Go handles division: https://stackoverflow.com/questions/32815400/how-to-perform-division-in-go - int / int = int, so we get results like 6 / 10 = 0, which is pretty confusing. To remedy this, we represent fields that are always int to be float64 anyway.

Closes https://github.com/bobheadxi/gobenchdata/issues/57

codecov[bot] commented 2 years ago

Codecov Report

Merging #58 (a1c7e2d) into master (ce7659b) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #58   +/-   ##
=======================================
  Coverage   30.87%   30.87%           
=======================================
  Files           8        8           
  Lines         460      460           
=======================================
  Hits          142      142           
  Misses        302      302           
  Partials       16       16           
Impacted Files Coverage Δ
bench/benchmark.go 50.00% <ø> (ø)
checks/evaluate.go 69.39% <ø> (ø)
bench/parser.go 69.12% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ce7659b...a1c7e2d. Read the comment docs.