Closed matheusd closed 2 months ago
So, basically, replacing the go test command, to update the benchmark results, with a main program, to be able to have a history of benchmarks with github versions?
to be able to have a history of benchmarks with github versions
Technically we already have this with the git history (having a main program generate the results wouldn't change it).
To replace the test results, instead of go test -tags ...
, clients would use something like go run . -replacereport
, while go run .
would simply re-run the report and serve the results locally (so that someone who just wants to test the numbers in their own arch could run go run github.com/...
without even having to git clone
first).
Essentially, it would be a small syntactic sugar/helper to make it easier for users to run the benchmarks.
Would you mind reviewing my PR? So I can close this issue or keep it open if the PR doesn't meet your expectations.
We could then make the main function of the root package in the repository regenerate the report, have it (the main program) embed the report assets and automatically serve the report details after generating.
Then, we could instruct users to run their own benchmarks by doing
go run github.com/alecthomas/go_serialization_benchmarks@latest
(or using specific tags or versions instead of @latest).