Skip to content

Commit bdf7d2d

Browse files
committed
WIP: TEST BENCHMARK!
1 parent c36eccc commit bdf7d2d

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/performance.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Run Benchmark
3838
run: |
3939
cd tests/performance/
40-
npm run compare-latest-vs-next
40+
npm run compare_latest_vs_next
4141
4242
- name: Comment PR
4343
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
@@ -71,7 +71,7 @@ jobs:
7171
- name: Run Benchmark
7272
run: |
7373
cd tests/performance/
74-
npm run compare-historical-versions # This command is generated and injected into package.json in the previous step.
74+
npm run compare_historical_versions # This command is generated and injected into package.json in the previous step.
7575
cat benchmark_check.md
7676
npm run chart # Creates benchmark_chart.md with the performance bar chart.
7777

tests/performance/make-test-command.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ cd api-definitions && npm install && cd ..
1010
echo REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 1 $(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js lint core@public --config=api-definitions/redocly.yaml --generate-ignore-file'\''")' | jq 'join(" ")' | xargs) --export-markdown benchmark_check.md --export-json benchmark_check.json > test-command.txt
1111

1212
# Put the command in the test section of the package.json:
13-
cat package.json | jq ".scripts.compare-historical-versions = \"$(cat test-command.txt)\"" > package.json
13+
cat package.json | jq ".scripts.compare_historical_versions = \"$(cat test-command.txt)\"" > package.json

tests/performance/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"scripts": {
77
"chart": "node chart.js > benchmark_chart.md",
88
"make-test": "bash make-test-command.sh",
9-
"compare-latest-vs-next": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 1 'node node_modules/cli-latest/bin/cli.js lint core@public --config=api-definitions/redocly.yaml --generate-ignore-file' 'node node_modules/cli-next/bin/cli.js lint core@public --config=api-definitions/redocly.yaml --generate-ignore-file' --export-markdown benchmark_check.md --export-json benchmark_check.json",
10-
"compare-historical-versions": "Placeholder..."
9+
"compare_latest_vs_next": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 1 'node node_modules/cli-latest/bin/cli.js lint core@public --config=api-definitions/redocly.yaml --generate-ignore-file' 'node node_modules/cli-next/bin/cli.js lint core@public --config=api-definitions/redocly.yaml --generate-ignore-file' --export-markdown benchmark_check.md --export-json benchmark_check.json",
10+
"compare_historical_versions": "Placeholder..."
1111
},
1212
"dependencies": {
1313
"cli-latest": "npm:@redocly/cli@latest",

0 commit comments

Comments
 (0)