Closed josephgardner closed 2 years ago
What is your go test
command? IIRC you must enable memory profiling with -benchmem
, e.g:
go test -bench . -benchmem ./... | gobenchdata --json bench.json
The "sample input" in the OP is an extract from the contents of my bench.json
which does include "BytesPerOp": 14284630,
The problem is when I feed this json file to gobenchdata checks eval prev-bench.json bench.json --json checks-results.json
the diff is always 0.
Thank you for the detail, I will take a look! I misread the original issue 😅
I have added a test case that replicates this scenario and it appears to be fixed! https://github.com/bobheadxi/gobenchdata/pull/58/files#diff-5090d56e4c47ae794394ba4372c98072a2a530a05f7c9f41588b5db0fb2710aaR53-R58
This patch is included in https://github.com/bobheadxi/gobenchdata/releases/tag/v1.0.4
The following check tests for a regression in
Mem.BytesPerOp
. However, the result is always 0.Results:
Sample input: