-
Notifications
You must be signed in to change notification settings - Fork 411
Track runtime of make test on bencher.dev
#9722
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
Conversation
400dd88 to
bff67cb
Compare
nopcoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool
- if we trust running the tool I don't see an issue calling the action that set it up or the curl install instead of pulling manully from github.
- can we use 'bencher run' without the file to and and report 'make test' step - the current code populate the github token in the same env (if we worried about passing it to untrusted process)
.github/workflows/test.yaml
Outdated
| name: Run Go tests | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| BENCHER_API_TOKEN: ${{secrets.BENCHER_API_TOKEN}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep the same style
| BENCHER_API_TOKEN: ${{secrets.BENCHER_API_TOKEN}} | |
| BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
It's only a few lines, and can be _very_ helpful to understand & debug failures
arielshaqed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Trying out the action; PTAL.
.github/workflows/test.yaml
Outdated
| name: Run Go tests | ||
| runs-on: ubuntu-22.04 | ||
| env: | ||
| BENCHER_API_TOKEN: ${{secrets.BENCHER_API_TOKEN}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bff67cb to
ee4a7a2
Compare
nopcoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making sure my comments were seen:
- if we trust running the tool I don't see an issue calling the action that set it up or the curl install instead of pulling manully from github.
- can we use 'bencher run' without the file to and and report 'make test' step - the current code populate the github token in the same env (if we worried about passing it to untrusted process)
the code looks the same as the initial review.
ee4a7a2 to
a623471
Compare
Both are about as risky, but by using the action we avoid explicitly adding our GH token to the environment.
a623471 to
39d21f9
Compare
AliRamberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this tool already! Maybe we need to measure it differently though, maybe more specific than the real/sys/user measures of the whole tests?
After reading some pages from the docs, there are really cool ways to integrate it in our CI
For tests there's actually an integration with go test -bench.
Not sure if it times the whole testing suite or each test independently but worth checking.
There're also build time and file size metrics we could collect. Probably around the goreleaser workflow...
|
@nopcoder seen and accepted :-). Not sure why you saw nothing, but verified that everything is now visible on the PR. @AliRamberg absolutely we can collect more statistics. Let's start with these, please! I want to start collecting data, and add more as we go along. |
nopcoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer to reduce the complexity of the go test run just because we like to report the take under test-go-runtime.
not blocking, but if we plan to keep it for long time - or apply it in more places - we should switch to use '--build-time' with json adapter to capture the time it takes to 'make test' to compelte
2b233d5 to
4a6fbc3
Compare
- It _is_ a time to run a build-ish step. - Better integration in bencher, shorter more understandable shell script. - bencher will include a nice name in the report.
4a6fbc3 to
e74a22e
Compare
|
I tried to use this but we end up measuring how long it takes to download all the modules: I will split the test-go target into test-go-build and test-go-run, so we can measure only the second. Obviously CI users care about both, but equally obviously we care mostly about time to run tests. |
Computer (and golang committers) say nope. It is not possible to create a single binary running tests from >1 package. So I'm giving up on this option, and pulling. We will have some numbers: wallclock for how long test-go takes. |
|
THANKS for the great reviews! |
You can see results (1 measurement for now) here.