Skip to content

Partially support BenchmarkXXX functions with the -bench and -test.bench flags #2487

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 7, 2022

Conversation

dkegel-fastly
Copy link
Contributor

Had this sitting around half-finished for a long time, just today I needed benchmarks, and suddenly the last little bit got much easier to write :-)

@dkegel-fastly dkegel-fastly marked this pull request as draft January 5, 2022 22:35
@dkegel-fastly dkegel-fastly force-pushed the dkegel-yet-moar-benchmark branch 3 times, most recently from a291379 to c46ba91 Compare January 6, 2022 03:07
@dkegel-fastly
Copy link
Contributor Author

Will go green after #2488 lands or the images are updated.

( Although it might take several retries... there seem to be multiple flaky CI failure modes, see e.g. the three failed runs before https://github.com/tinygo-org/tinygo/runs/4722737811 )

@dkegel-fastly dkegel-fastly marked this pull request as ready for review January 6, 2022 03:10
…o easier

On the theory that tinygo is tending towards smaller diffs with go...

Also adds placeholder for ReportAllocs(), otherwise zero semantic changes.
@dkegel-fastly dkegel-fastly force-pushed the dkegel-yet-moar-benchmark branch from c46ba91 to 87993ca Compare January 6, 2022 16:17
@dkegel-fastly
Copy link
Contributor Author

dkegel-fastly commented Jan 6, 2022

I think this is ready. I hope to add support for sub-benchmarks soon, but even without them it seems useful.
The three commits are best reviewed individually.

Let's land it with all three commits intact, I am looking forward to seeing what /proc/cpuinfo says on a bad ci run.

@dkegel-fastly dkegel-fastly changed the title Support BenchmarkXXX functions with the -bench and -test.bench flags Partially support BenchmarkXXX functions with the -bench and -test.bench flags Jan 6, 2022
@deadprogram
Copy link
Member

OK this should be very interesting. Thanks for working on this, been wanting some benchmarks myself for a while.

Now merging.

@deadprogram deadprogram merged commit b4fa658 into tinygo-org:dev Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants