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

WIP #2

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ jobs:
run: |
mvn package -DskipTests=true
java -Djmh.executor=VIRTUAL -jar bench/target/benchmarks.jar -i 1 -wi 0 -f 1 -to 1100ms -r 1000ms -rf json
- name: Store benchmark result
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Check & store benchmark result
uses: benchmark-action/github-action-benchmark@v1
# Only store updated benchmark results on main branch
if: steps.extract_branch.outputs.branch == 'main'
with:
tool: 'jmh'
output-file-path: jmh-result.json
# Use personal access token instead of GITHUB_TOKEN due to https://github.community/t/github-action-not-triggering-gh-pages-upon-push/16096
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
Expand All @@ -53,6 +58,22 @@ jobs:
fail-on-alert: true
alert-comment-cc-users: '@adamw'
# Store benchmark results in the docs folder of the main branch
gh-pages-branch: 'main'
gh-pages-branch: ${{ steps.extract_branch.outputs.branch }}
benchmark-data-dir-path: 'docs/bench'
skip-fetch-gh-pages: true
- name: Check benchmark result
uses: benchmark-action/github-action-benchmark@v1
# PRs, other branches
if: steps.extract_branch.outputs.branch != 'main'
with:
tool: 'jmh'
output-file-path: jmh-result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: false
alert-threshold: '120%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@adamw'
gh-pages-branch: ${{ steps.extract_branch.outputs.branch }}
benchmark-data-dir-path: 'docs/bench'
skip-fetch-gh-pages: true
1 change: 1 addition & 0 deletions bench/src/main/java/org/sample/RendezvousBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public void exchange1() throws InterruptedException {
@GroupThreads(1)
public void exchange2() throws InterruptedException {
exchanger.exchange(64);
Thread.sleep(10);
}

//
Expand Down