Skip to content
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

Benchmarking in CI (SCP-2353) #3441

Merged
merged 3 commits into from
Jun 28, 2021
Merged

Benchmarking in CI (SCP-2353) #3441

merged 3 commits into from
Jun 28, 2021

Conversation

gilligan
Copy link
Contributor

@gilligan gilligan commented Jun 28, 2021

Summary
Add a benchmarking script that will be executed by buildkite and a
GitHub action to trigger the buidkite pipeline running this script
through /benchmark comments on PRs

Details
The benchmark.yaml workflow below looks for /benchmark comments which works nicely but it should be noted this only works with this code in master.

I did test and experiment using a fork and everything seemed to work nicely eventually but it's of course possible that something will still go wrong as we can't really test this fully before it's actually merged (annoying, yes).

The comments added by the bot aren't super pretty but i guess that is something we can change down the road once it's been established that this actually works reliably. Comments have to be posted as JSON content which is a bit annoying and I just used jq to escape the output generated by the benchmark comparison script.


Pre-submit checklist:

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
    • Formatting, materialized Nix files, PNG optimization, etc. are updated
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Pre-merge checklist:

  • Someone approved it
  • Commits have useful messages
  • Review clarifications made it into the code
  • History is moderately tidy; or going to squash-merge

@gilligan gilligan requested a review from michaelpj June 28, 2021 09:55
@gilligan gilligan changed the title Benchmarking in CI Benchmarking in CI (SCP-2353) Jun 28, 2021
Add a benchmarking script that will be executed by buildkite and a
GitHub action to trigger the buidkite pipeline running this script
through `/benchmark` comments on PRs
Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

.github/workflows/benchmark.yml Outdated Show resolved Hide resolved
ci-plutus-benchmark.sh Outdated Show resolved Hide resolved
ci-plutus-benchmark.sh Outdated Show resolved Hide resolved
ci-plutus-benchmark.sh Outdated Show resolved Hide resolved
ci-plutus-benchmark.sh Outdated Show resolved Hide resolved
Add comments explaining `cabal update` and the use of `jq`
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelpj now that I extracted it i agree that it's nicer to have this in a separate file/script 👍

BRANCH="$1"
PR="$2"

echo "[trigger-buildkite-pipeline]: Triggering build for $PR_BRANCH"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "[trigger-buildkite-pipeline]: Triggering build for $PR_BRANCH"
echo "[trigger-buildkite-pipeline]: Triggering build for $BRANCH"

- Move scripts to ./scripts folder
- Extract curl/buildkite invocation to separate script
@michaelpj michaelpj merged commit 2bd3fd1 into master Jun 28, 2021
koslambrou pushed a commit that referenced this pull request Jun 29, 2021
* Benchmarking in CI (SCP-2353)

Add a benchmarking script that will be executed by buildkite and a
GitHub action to trigger the buidkite pipeline running this script
through `/benchmark` comments on PRs

* ci-plutus-benchmark.sh: Add some comments

Add comments explaining `cabal update` and the use of `jq`

* Refactor benchmark scripts

- Move scripts to ./scripts folder
- Extract curl/buildkite invocation to separate script
@kwxm kwxm deleted the benchmarking-ci branch October 12, 2021 04:28
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