Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BenchmarkXXX: could not parse run: strconv.Atoi: parsing "": invalid syntax (line: BenchmarkXXX): "BenchmarkXXX" #80

Open
pmalek opened this issue Nov 7, 2024 · 0 comments

Comments

@pmalek
Copy link

pmalek commented Nov 7, 2024

Installing the most recent version with

go install go.bobheadxi.dev/gobenchdata@latest

and using it as described in the README yields an error:

go test -v -benchmem -bench . -run ^$ -count 1  . | gobenchdata --json bench.json
BenchmarkSanitizedCopy: could not parse run: strconv.Atoi: parsing "": invalid syntax (line: BenchmarkSanitizedCopy): "BenchmarkSanitizedCopy"

The output seems to be just fine without using gobenchdata:

go test -v -benchmem -bench . -run ^$ -count 1 -json ./internal/dataplane/kongstate
{"Time":"2024-11-07T16:32:08.944142+01:00","Action":"start","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate"}
{"Time":"2024-11-07T16:32:09.410573+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"goos: darwin\n"}
{"Time":"2024-11-07T16:32:09.410829+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"goarch: arm64\n"}
{"Time":"2024-11-07T16:32:09.410862+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"pkg: github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate\n"}
{"Time":"2024-11-07T16:32:09.410869+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"cpu: Apple M1 Max\n"}
{"Time":"2024-11-07T16:32:09.410878+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"BenchmarkSanitizedCopy\n"}
{"Time":"2024-11-07T16:32:11.53412+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"BenchmarkSanitizedCopy-10    \t    4878\t    245447 ns/op\t  778485 B/op\t       5 allocs/op\n"}
{"Time":"2024-11-07T16:32:11.534178+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"PASS\n"}
{"Time":"2024-11-07T16:32:11.53497+01:00","Action":"output","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Output":"ok  \tgithub.heygears.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate\t2.589s\n"}
{"Time":"2024-11-07T16:32:11.534994+01:00","Action":"pass","Package":"github.com/kong/kubernetes-ingress-controller/v3/internal/dataplane/kongstate","Elapsed":2.591}
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant