Skip to content

Commit 4ecf750

Browse files
committed
Update workflow to run two benchmarks
This commit is a test to check if running both the benchmarks in the same workflow would make any difference to the results Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 64fca1a commit 4ecf750

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

.github/workflows/benchmark_regression_test.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,42 @@ on:
1212
- 'integration/**'
1313
- 'scripts/**'
1414
- '.github/workflows/**'
15-
15+
1616
jobs:
17-
benchmark-and-fetch-previous-results_and_compare:
18-
name: Run Benchmark on current Branch
17+
test-twice:
1918
runs-on: ubuntu-20.04
19+
2020
steps:
21-
- uses: actions/checkout@v3
2221
- uses: actions/setup-go@v4
2322
with:
2423
go-version: '1.18.10'
24+
- name: Checkout main
25+
uses: actions/checkout@v3
26+
with:
27+
ref: main
2528
- run: make
2629
- name: Run benchmark
27-
run: make benchmarks-perf-test
30+
run: make benchmarks-perf-test
2831
- name: Make previous directory
2932
run: mkdir -v ${{ github.workspace }}/previous
30-
- name: Download previous run artifact
31-
id: download-artifact
32-
uses: dawidd6/action-download-artifact@v2
33+
- name: Copy results to previous directory
34+
run: cp -r ${{ github.workspace }}/benchmark/performanceTest/output ${{ github.workspace }}/previous
35+
- name: Check out PR
36+
uses: actions/checkout@v3
3337
with:
34-
github_token: ${{secrets.GITHUB_TOKEN}}
35-
name: benchmark-result-artifact
36-
name_is_regexp: true
37-
path: ${{ github.workspace }}/previous
38-
repo: ${{ github.repository }}
39-
check_artifacts: false
40-
search_artifacts: true
41-
skip_unpack: false
42-
if_no_artifact_found: fail
43-
workflow: benchmark_visualization.yml
38+
ref: ${{ github.event.pull_request.head.sha }}
39+
- run: make
40+
- name: Run benchmark
41+
run: make benchmarks-perf-test
42+
- name: Make current directory
43+
run: mkdir -v ${{ github.workspace }}/current
44+
- name: Copy results to current directory
45+
run: cp -r ${{ github.workspace }}/benchmark/performanceTest/output ${{ github.workspace }}/current
4446
- name: Perform Comparison and log results
4547
id: run-compare
4648
run: |
4749
sudo chmod +x ${{ github.workspace }}/scripts/check_regression.sh
48-
if sudo ${{ github.workspace }}/scripts/check_regression.sh ${{ github.workspace }}/previous/benchmark-result-artifact/results.json ${{github.workspace}}/benchmark/performanceTest/output/results.json; then
50+
if sudo ${{ github.workspace }}/scripts/check_regression.sh ${{ github.workspace }}/previous/results.json ${{github.workspace}}/current/results.json; then
4951
echo "Comparison successful. All P90 values are within the acceptable range."
5052
else
5153
echo "Comparison failed. Current P90 values exceed 110% of the corresponding past values."

0 commit comments

Comments
 (0)