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

panic: could not parse runs: strconv.Atoi: parsing "2020-04-25T22:43:13.377Z": invalid syntax #35

Closed bonedaddy closed 4 years ago

bonedaddy commented 4 years ago

Version Information

go: 1.14.2 gobenchdata: v0.5.1

Bug Description

I'm using gobenchdata in a private github repository, and as far as I'm aware, github actions have problems integrating with private github repositories. As such my process for using gobenchdata is a bit different than normal, and consists of the following process during release builds:

Up until today this has been working without issues beyond manual labour, however today this failed with the error:

panic: could not parse runs: strconv.Atoi: parsing "2020-04-25T22:43:13.377Z": invalid syntax

Log 1

go test -bench=. --benchtime 1000x ./benchmarks/releasemark/... -benchmem > bench.txt
cat bench.txt | gobenchdata --json release/tex-gobenchdata-`git describe --tags`.json
panic: BenchmarkTemporalX_DownloadMulti-2: could not parse runs: strconv.Atoi: parsing "2020-04-25T22:43:13.377Z": invalid syntax
goroutine 1 [running]:
main.main()
    /home/travis/gopath/pkg/mod/go.bobheadxi.dev/gobenchdata@v0.5.1/main.go:66 +0xa37
Makefile:152: recipe for target 'release-bench' failed
make: *** [release-bench] Error 2
The command "if [ "$TRAVIS_OS_NAME" = "linux" ]; then make release-bench ; fi" failed and exited with 2 during .
Your build has been stopped.

Log 2

I tried downgrading to v0.5.0 and got the same error:

go test -bench=. --benchtime 1000x ./benchmarks/releasemark/... -benchmem > bench.txt
cat bench.txt | gobenchdata --json release/tex-gobenchdata-`git describe --tags`.json
panic: BenchmarkTemporalX_DownloadMulti-2: could not parse runs: strconv.Atoi: parsing "2020-04-25T23:45:42.353Z": invalid syntax
goroutine 1 [running]:
main.main()
    /home/travis/gopath/pkg/mod/go.bobheadxi.dev/gobenchdata@v0.5.0/main.go:66 +0xa37
Makefile:152: recipe for target 'release-bench' failed
make: *** [release-bench] Error 2
The command "if [ "$TRAVIS_OS_NAME" = "linux" ]; then make release-bench ; fi" failed and exited with 2 during .
bonedaddy commented 4 years ago

Found the source of the bug, a log that shouldn't have been emitted was being emitted:

BenchmarkTemporalX_DownloadMulti-12         2020-04-25T17:33:02.021-0700    ERROR   reprovider.simple   simple/reprovide.go:80  failed to reprovide: failed to find any peer in table
github.com/ipfs/go-ipfs-provider/simple.(*Reprovider).Run
    /home/solidity/go/pkg/mod/github.com/ipfs/go-ipfs-provider@v0.4.2/simple/reprovide.go:80