Skip to content

Commit

Permalink
Use upstream benchmark action + update issues when names match (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN committed Nov 2, 2021
1 parent b9ca772 commit c73cd98
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,33 +68,31 @@ def parse_args():
)["MetricDataResults"]

benchmarks_json = json.dumps(
{
"benchmarks": [
{
"Name": "Soak Test Average CPU Load",
"Value": mean(
next(
metric_data
for metric_data in metric_data_results
if metric_data["Id"] == "cpu_load_expr"
)["Values"]
),
"Unit": "Percent",
},
{
"Name": "Soak Test Average Virtual Memory Used",
"Value": mean(
next(
metric_data
for metric_data in metric_data_results
if metric_data["Id"] == "total_memory_expr"
)["Values"]
)
/ (2 ** 20),
"Unit": "Megabytes",
},
]
},
[
{
"name": "Soak Test Average CPU Load",
"value": mean(
next(
metric_data
for metric_data in metric_data_results
if metric_data["Id"] == "cpu_load_expr"
)["Values"]
),
"unit": "Percent",
},
{
"name": "Soak Test Average Virtual Memory Used",
"value": mean(
next(
metric_data
for metric_data in metric_data_results
if metric_data["Id"] == "total_memory_expr"
)["Values"]
)
/ (2 ** 20),
"unit": "Megabytes",
},
],
indent=4,
)

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/soak-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ jobs:
git checkout main;
[[ $HAS_RESULTS_ALREADY == true ]]
- name: Graph and Report Performance Test Averages result
uses: NathanielRN/github-action-benchmark@v1.8.3-alpha3
uses: benchmark-action/github-action-benchmark@v1
continue-on-error: true
id: check-failure-after-performance-tests
with:
name: Soak Test Results - sample-app-${{ matrix.app-platform }}-${{ matrix.instrumentation-type }}
tool: custombenchmark
tool: customSmallerIsBetter
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
max-items-in-chart: ${{ env.MAX_BENCHMARKS_TO_KEEP }}
Expand All @@ -217,6 +217,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/auto-issue-templates/failure-during-soak_tests.md
update_existing: true
- name: Publish Issue if failed AFTER Performance Tests
uses: JasonEtco/create-an-issue@v2
if: ${{ github.event_name == 'schedule' &&
Expand All @@ -227,6 +228,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/auto-issue-templates/failure-after-soak_tests.md
update_existing: true
- name: Check for Performance Degradation either DURING or AFTER Performance Tests
if: ${{ steps.check-failure-during-performance-tests.outcome == 'failure' ||
steps.check-failure-after-performance-tests.outcome == 'failure' }}
Expand Down

0 comments on commit c73cd98

Please sign in to comment.