-
Notifications
You must be signed in to change notification settings - Fork 201
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
RFC30: Compile time benchmark #2617
RFC30: Compile time benchmark #2617
Conversation
- add scripts
At this point, the script does not upload the result markdown file. |
6b7791a
to
4d5f117
Compare
4d5f117
to
72cbd5d
Compare
The error is the regex unicode thing. Once the other branch is merged this should be fixed as well. |
Gotta fix this. Creating network "smithy-rs-buildoqvajw_default" with the default driver
Creating smithy-rs-buildoqvajw_smithy-rs-build_1 ...
Creating smithy-rs-buildoqvajw_smithy-rs-build_1 ... done
bash: ./ci-scripts/compiletime-benchmark: Permission denied
Stopping smithy-rs-buildoqvajw_smithy-rs-build_1 ...
Stopping smithy-rs-buildoqvajw_smithy-rs-build_1 ... done
Removing smithy-rs-buildoqvajw_smithy-rs-build_1 ...
Removing smithy-rs-buildoqvajw_smithy-rs-build_1 ... done
Removing network smithy-rs-buildoqvajw_default |
I added a script for bench marking the compile time, but it gives me Permission denied. I have no idea how to fix it. I appreciate help!
|
It's probably just missing the execute permission. If you're on a Unix-like system, you just need to |
It's happening on the Github CI. Here is a full message.
|
|
5de9d85
to
7dd284e
Compare
@jdisanti |
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.
Sorry, I haven't had a chance to look at this closely. This looks really cool.
.github/workflows/ci.yml
Outdated
@@ -297,6 +299,19 @@ jobs: | |||
shell: bash | |||
run: cross test --target ${{ matrix.target }} --manifest-path "aws/rust-runtime/Cargo.toml" ${{ matrix.test_aws_exclude }} --workspace | |||
|
|||
# compile time benchmark |
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 think this should get added to the PR bot instead of to CI. That way, the results get posted as a comment on PRs (although this only works for maintainers right now, unfortunately).
The PR bot workflow basically works like this:
- Kicks off the
generate-diff
andgenerate-doc-preview
jobs in parallel. You could just add a newcompiletime-benchmark
job in here. - The
post-bot-comment
job depends on all the parallel jobs, grabs their output, and aggregates it into a human readable comment. Then it posts to the GitHub API to make the comment.
The GitHub Actions job outputs feature is being used to communicate between the jobs. For example:
outputs:
bot-message: ${{ steps.generate-preview.outputs.bot-message }}
and
${{ needs.generate-doc-preview.outputs.bot-message }}
Testing this is going to be difficult of course. I think what we could do is after reviewing it to see if it looks like it should work, we could copy it to a new PR so that it has the right permissions for testing.
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.
Gotcha.
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 initially thought about using AWS batch, since you can have better control over the hardware, I can just show the amount of time that it took to finish instead of showing relative values. Also, results are going to be more re-producible.
Since I don't have access to your AWS account, I concluded that it would be very difficult for me to do any debugging.
Just FYI.
@jdisanti CI is updated. Would you mind checking it out? |
@thomas-k-cameron John is out until next week, but this looks good to me. Thanks for all your work. |
@thomas-k-cameron It turns out this broke CI so we had to revert it. You'll need to open a new PR. |
Motivation and Context
This PR implements ci-script for bench marking compile time.
Results are turned into a markdown file and compile time is normalized to a value relative to the compile time of S3's sdk on dev profile without any features.
Benchmark is triggered for every PR.
I considered using AWS batch, however, I decided not to move forward with for following reasons
Testing
NA
Checklist
CHANGELOG.next.toml
if I made changes to the smithy-rs codegen or runtime cratesCHANGELOG.next.toml
if I made changes to the AWS SDK, generated SDK code, or SDK runtime cratesBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.