Skip to content

Commit 4a29df3

Browse files
authored
Use upstream benchmark action + update issues when names match (#104)
1 parent df05909 commit 4a29df3

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

.github/scripts/performance-tests/get-metric-data/produce_performance_test_results.py

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -68,33 +68,31 @@ def parse_args():
6868
)["MetricDataResults"]
6969

7070
benchmarks_json = json.dumps(
71-
{
72-
"benchmarks": [
73-
{
74-
"Name": "Soak Test Average CPU Load",
75-
"Value": mean(
76-
next(
77-
metric_data
78-
for metric_data in metric_data_results
79-
if metric_data["Id"] == "cpu_load_expr"
80-
)["Values"]
81-
),
82-
"Unit": "Percent",
83-
},
84-
{
85-
"Name": "Soak Test Average Virtual Memory Used",
86-
"Value": mean(
87-
next(
88-
metric_data
89-
for metric_data in metric_data_results
90-
if metric_data["Id"] == "total_memory_expr"
91-
)["Values"]
92-
)
93-
/ (2 ** 20),
94-
"Unit": "Megabytes",
95-
},
96-
]
97-
},
71+
[
72+
{
73+
"name": "Soak Test Average CPU Load",
74+
"value": mean(
75+
next(
76+
metric_data
77+
for metric_data in metric_data_results
78+
if metric_data["Id"] == "cpu_load_expr"
79+
)["Values"]
80+
),
81+
"unit": "Percent",
82+
},
83+
{
84+
"name": "Soak Test Average Virtual Memory Used",
85+
"value": mean(
86+
next(
87+
metric_data
88+
for metric_data in metric_data_results
89+
if metric_data["Id"] == "total_memory_expr"
90+
)["Values"]
91+
)
92+
/ (2 ** 20),
93+
"unit": "Megabytes",
94+
},
95+
],
9896
indent=4,
9997
)
10098

.github/workflows/soak-testing.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ jobs:
211211
git checkout main;
212212
[[ $HAS_RESULTS_ALREADY == true ]]
213213
- name: Graph and Report Performance Test Averages result
214-
uses: NathanielRN/github-action-benchmark@v1.8.3-alpha3
214+
uses: benchmark-action/github-action-benchmark@v1
215215
continue-on-error: true
216216
id: check-failure-after-performance-tests
217217
with:
218218
name: Soak Test Results - sample-app-${{ matrix.app-platform }}-${{ matrix.instrumentation-type }}
219-
tool: custombenchmark
219+
tool: customSmallerIsBetter
220220
output-file-path: output.json
221221
github-token: ${{ secrets.GITHUB_TOKEN }}
222222
max-items-in-chart: ${{ env.MAX_BENCHMARKS_TO_KEEP }}
@@ -240,6 +240,7 @@ jobs:
240240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241241
with:
242242
filename: .github/auto-issue-templates/failure-during-soak_tests.md
243+
update_existing: true
243244
- name: Publish Issue if failed AFTER Performance Tests
244245
uses: JasonEtco/create-an-issue@v2
245246
if: ${{ github.event_name == 'schedule' &&
@@ -250,6 +251,7 @@ jobs:
250251
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
251252
with:
252253
filename: .github/auto-issue-templates/failure-after-soak_tests.md
254+
update_existing: true
253255
- name: Check for Performance Degradation either DURING or AFTER Performance Tests
254256
if: ${{ steps.check-failure-during-performance-tests.outcome == 'failure' ||
255257
steps.check-failure-after-performance-tests.outcome == 'failure' }}

0 commit comments

Comments
 (0)