-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add benchmarking workflow using ASV #74
Conversation
2f176a8
to
6312074
Compare
acf7941
to
af7baa3
Compare
e814485
to
7a8ed99
Compare
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.
Hi @light2802 this looks good. I have a few minor comments. Can you address them so we can get this merged?
.github/workflows/benchmarks.yml
Outdated
- name: Create results html on dest repo | ||
if: github.event_name != 'pull_request_target' | ||
continue-on-error: true | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN }} | ||
with: | ||
source-directory: ".asv/html" | ||
destination-github-username: "tardis-sn" | ||
destination-repository-name: "stardis-benchmarks" | ||
user.email: tardis.sn.bot@gmail.com | ||
target-branch: main | ||
|
||
- name: Push misc data to dest repo | ||
if: github.event_name != 'pull_request_target' | ||
continue-on-error: true | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
API_TOKEN_GITHUB: ${{ secrets.BOT_TOKEN }} | ||
with: | ||
source-directory: ".asv/results" | ||
destination-github-username: "tardis-sn" | ||
destination-repository-name: "stardis-benchmarks" | ||
user.email: tardis.sn.bot@gmail.com | ||
target-branch: main |
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 don't think you need to do this separately- once the env files are deleted, all that remains is HTML and the results directory right? You should be able to send it all at once. I don't think having the name "misc" is a good idea.
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 am pushing the html to the root directory as it will automatically deploy the webpage using github pages and we can see the results instantaneously
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 don't find this organised. I like the approach of not needing a GitHub Actions workflow, however.
But is that the only reason? Can you let me know why you're pushing it to the root directory?
But the workflow I used is pretty simple. I don't think it should be named "misc". I think it should be named something like "asv-results" at least.
Either way, the approaches should be identical for STARDIS and TARDIS benchmarks.
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.
GitHub pages builds the site from the root directory so I want the .asv/html in root. As for the .asv/results I don't mind naming it to something else
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.
But if someone wants to find results from the benchmarks repo they won't be able to find it easily right?
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.
You also see the results instantly with the workflow I made- I think it looks cleaner, right? Don't you think so?
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.
Oh so you made another workflow there. Yeah that's fine too
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.
Done. Thanks
Codecov Report
@@ Coverage Diff @@
## main #74 +/- ##
=======================================
Coverage 34.97% 34.97%
=======================================
Files 17 17
Lines 629 629
=======================================
Hits 220 220
Misses 409 409 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
* Bechmark using ASV * Delete env files only if generated * Fix posting comment * Try addding token as env var * Put env var at correct place * fix benchmark comment bug * Fix typo * Add compare steps names and fix checkout step * Push asv results to benchmarks results repo as it is * Fix workflow name --------- Co-authored-by: Joshua Shields <54691495+jvshields@users.noreply.github.com>
📝 Description
Type: 🚀
feature
| 🚦testing
| 🎢infrastructure
Add benchmarking workflow for gauging stardis performance using ASV. The workflow can push the benchmarking results to another repo to be viewed later. The workflow compares the performance for the last five commits for now, but this can be changed later.
Only one benchmarking test has been added, which runs the run_stardis function. Next PRs will add code for benchmarking other internal parts, but that requires some change in stardis code.
📌 Resources
ASV resources: https://asv.readthedocs.io/en/stable/using.html
🚦 Testing
How did you test these changes?
☑️ Checklist
build_docs
label