Skip to content

Commit f642744

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 f642744

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

.github/workflows/benchmark_regression_test.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,40 @@ 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'
25-
- run: make
24+
- name: Checkout main
25+
uses: actions/checkout@v3
26+
with:
27+
ref: main
2628
- name: Run benchmark
27-
run: make benchmarks-perf-test
29+
run: make benchmarks-perf-test
2830
- name: Make previous directory
2931
run: mkdir -v ${{ github.workspace }}/previous
30-
- name: Download previous run artifact
31-
id: download-artifact
32-
uses: dawidd6/action-download-artifact@v2
32+
- name: Copy results to previous directory
33+
run: cp -r ${{ github.workspace }}/benchmark/performanceTest/output ${{ github.workspace }}/previous
34+
- name: Check out PR
35+
uses: actions/checkout@v3
3336
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
37+
ref: ${{ github.event.pull_request.head.sha }}
38+
- name: Run benchmark
39+
run: make benchmarks-perf-test
40+
- name: Make current directory
41+
run: mkdir -v ${{ github.workspace }}/current
42+
- name: Copy results to current directory
43+
run: cp -r ${{ github.workspace }}/benchmark/performanceTest/output ${{ github.workspace }}/current
4444
- name: Perform Comparison and log results
4545
id: run-compare
4646
run: |
4747
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
48+
if sudo ${{ github.workspace }}/scripts/check_regression.sh ${{ github.workspace }}/previous/results.json ${{github.workspace}}/current/results.json; then
4949
echo "Comparison successful. All P90 values are within the acceptable range."
5050
else
5151
echo "Comparison failed. Current P90 values exceed 110% of the corresponding past values."

0 commit comments

Comments
 (0)