Skip to content

Commit 4c65dd0

Browse files
beta-zilianigithub-actionsggiraldez
authored
Benchmarking Cargo (#1372)
It goes on top of #1325 It adds `infra perf cargo` in a similar fashion to #1325 `infra perf npm`. It replaces the old `infra perf`, using a hardcoded subset of the projects listed in the `projects.json` file. --------- Co-authored-by: github-actions <github-actions@users.noreply.github.com> Co-authored-by: Gustavo Giráldez <ggiraldez@manas.tech>
1 parent 3b1609e commit 4c65dd0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3573
-4049
lines changed

.cspell.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"ignoreWords": [
77
// Alphabetically sorted list of "allowed" words to ignore:
88
"abicoder",
9+
"callgrind",
910
"codecopy",
1011
"codegen",
1112
"codesize",
@@ -29,6 +30,7 @@
2930
"nonterminal",
3031
"nonterminals",
3132
"rustup",
33+
"sourcify",
3234
"struct",
3335
"structs",
3436
"tera",

.github/workflows/benchmark_cargo.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ on:
1111
required: true
1212
default: true
1313

14-
bencherProject:
15-
description: "Bencher project:"
14+
bencherProjectSlang:
15+
description: "Bencher project (Slang tests):"
16+
type: "string"
17+
18+
bencherProjectCmp:
19+
description: "Bencher project (comparisons):"
1620
type: "string"
1721

1822
# Run on pushes to 'main' branch:
@@ -39,16 +43,28 @@ jobs:
3943
- name: "Restore Cache"
4044
uses: "./.github/actions/cache/restore"
4145

42-
- name: "Set bencher project"
46+
- name: "infra setup cargo"
47+
run: "./scripts/bin/infra setup cargo"
48+
49+
- name: "Set bencher project (Slang)"
50+
4351
run: |
44-
echo "SLANG_BENCHER_PROJECT=${{ inputs.bencherProject }}" >> $GITHUB_ENV
45-
if: "${{ inputs.bencherProject }}"
52+
echo "SLANG_BENCHER_PROJECT=${{ inputs.bencherProjectSlang }}" >> $GITHUB_ENV
53+
if: "${{ inputs.bencherProjectSlang }}"
4654

47-
- name: "infra setup"
48-
run: "./scripts/bin/infra setup"
55+
- name: "infra perf cargo slang"
56+
run: "./scripts/bin/infra perf cargo ${{ inputs.dryRun == true && '--dry-run' || '' }} slang"
57+
env:
58+
BENCHER_API_TOKEN: "${{ secrets.BENCHER_API_TOKEN }}"
59+
60+
- name: "Set bencher project (comparisons)"
61+
62+
run: |
63+
echo "SLANG_BENCHER_PROJECT=${{ inputs.bencherProjectCmp }}" >> $GITHUB_ENV
64+
if: "${{ inputs.bencherProjectCmp }}"
4965

50-
- name: "infra perf cargo"
51-
run: "./scripts/bin/infra perf cargo ${{ inputs.dryRun == true && '--dry-run' || '' }}"
66+
- name: "infra perf cargo comparison"
67+
run: "./scripts/bin/infra perf cargo ${{ inputs.dryRun == true && '--dry-run' || '' }} comparison"
5268
env:
5369
BENCHER_API_TOKEN: "${{ secrets.BENCHER_API_TOKEN }}"
5470

.github/workflows/benchmark_npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: "Set bencher project"
4343
run: |
44-
echo "SLANG_BENCHER_PROJECT=${{ inputs.bencherProject || 'slang-dashboard-npm' }}" >> $GITHUB_ENV
44+
echo "SLANG_BENCHER_PROJECT=${{ inputs.bencherProject }}" >> $GITHUB_ENV
4545
if: "${{ inputs.bencherProject }}"
4646

4747
- name: "infra setup"

0 commit comments

Comments
 (0)