Skip to content

Commit 2bc6a61

Browse files
committed
feat(ci): add benchmark results as a comment to the PR for each run
Signed-off-by: Jiaxiao (mossaka) Zhou <[email protected]>
1 parent 827fbd4 commit 2bc6a61

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/actions/run-hey-load-test/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ runs:
3434
summary-always: true
3535
alert-threshold: "130%"
3636
fail-on-alert: ${{ github.event_name == 'schedule' }}
37+
# Enable comment to the PR
38+
comment-always: ${{ github.event_name != 'schedule' }}
39+
3740
- name: Report Latency results
3841
if : ${{ github.event_name == 'schedule' }}
3942
uses: benchmark-action/[email protected]
@@ -66,4 +69,5 @@ runs:
6669
summary-always: true
6770
alert-threshold: "130%"
6871
fail-on-alert: false
69-
external-data-json-path: ./cache/latency_results.json
72+
external-data-json-path: ./cache/latency_results.json
73+
comment-always: true

.github/workflows/benchmarks.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
# Automatically push the benchmark result to gh-pages branch
5353
# See https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#charts-on-github-pages-1 for more details
5454
auto-push: ${{ github.event_name == 'schedule' }}
55+
# Enable comment to the PR
56+
comment-always: ${{ github.event_name != 'schedule' }}
5557

5658
benchmark-mem:
5759
runs-on: ubuntu-latest
@@ -96,6 +98,8 @@ jobs:
9698
# Automatically push the benchmark result to gh-pages branch
9799
# See https://github.com/benchmark-action/github-action-benchmark?tab=readme-ov-file#charts-on-github-pages-1 for more details
98100
auto-push: ${{ github.event_name == 'schedule' }}
101+
# Enable comment to the PR
102+
comment-always: ${{ github.event_name != 'schedule' }}
99103

100104
benchmark-http:
101105
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)