Skip to content

chore: upgrade performance benchmark#2816

Open
AlbinaBlazhko17 wants to merge 12 commits into
mainfrom
chore/upgrade-perf-benchmark
Open

chore: upgrade performance benchmark#2816
AlbinaBlazhko17 wants to merge 12 commits into
mainfrom
chore/upgrade-perf-benchmark

Conversation

@AlbinaBlazhko17
Copy link
Copy Markdown
Contributor

@AlbinaBlazhko17 AlbinaBlazhko17 commented May 14, 2026

What/Why/How?

  • Changed metrics from Mean + Stddev to Median + MAD,because sometimes measurement in CI can produce a huge glitch. e.g. we measure: 1.01, 1.02, 1.02, 6.4. In case when we have Mean we will calculate sum divided by number, so this glitch will have a huge influence on a final number, but for the Median we will not have this.
  • Dropped old cli versions and left versions:
    2.0.0 - left as starting point
    2.11.1 - left for testing, no perf changes
    2.13.0 - left for testing, no perf changes
    2.14.2 - perf improvements (JSON pointer)
    2.27.0 - huge perf improvement
    2.30.2 - can have influence on perf
    2.31.0 - added latest minor release for testing
  • Added benchmark for lint
  • Changed warmup from 1 to 2 to have more accurate benchmarks

‼️NOTE: Changes in workflow will be removed after this PR will be approved. Left for future testing purposes. Only line, that will be changed: cat benchmark_bundle.md benchmark_lint.md.

Reference

Testing

You can see tests below in this PR.

Screenshots (optional)

Check yourself

  • This PR follows the contributing guide
  • All new/updated code is covered by tests
  • Core code changed? - Tested with other Redocly products (internal contributions only)
  • New package installed? - Tested in different environments (browser/node)
  • Documentation update has been considered

Security

  • The security impact of the change has been considered
  • Code follows company security practices and guidelines

Note

Low Risk
Changes are limited to CI performance harness and reporting; no production CLI or auth/data paths are modified.

Overview
Upgrades the PR performance benchmark so CI reports bundle, lint, and check-config side by side, using median and MAD (with relative uncertainty on slower rows) instead of mean/stddev so occasional CI spikes distort results less.

The generated hyperfine run now uses warmup 2, writes separate benchmark_* artifacts per command, and chart.js builds a multi-column markdown table for the PR comment. Historical CLI pins in _enhancedDependencies are trimmed to a smaller set (including 2.31.0).

The performance workflow can be re-triggered via the performance-benchmark label (without an empty commit), installs extra CLI versions on release PRs or when that label is present, and uses a per-run comment tag on labeled PRs so reruns stay comparable in-thread.

Reviewed by Cursor Bugbot for commit 86d0e6d. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

⚠️ No Changeset found

Latest commit: 86d0e6d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-latest 1.982s ± 0.007s ▓ 1.00x (Fastest)
cli-next 1.989s ± 0.005s ▓ 1.00x

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 81.05% (🎯 80%) 7301 / 9007
🔵 Statements 80.4% (🎯 80%) 7585 / 9433
🔵 Functions 84.08% (🎯 83%) 1463 / 1740
🔵 Branches 72.55% (🎯 72%) 4939 / 6807
File CoverageNo changed files found.
Generated in workflow #9996 for commit 86d0e6d by the Vitest Coverage Report Action

@AlbinaBlazhko17 AlbinaBlazhko17 added the performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.793s ± 0.013s ▓ 1.02x
cli-2.03.1 1.751s ± 0.011s ▓ 1.00x (Fastest)
cli-2.08.0 1.786s ± 0.005s ▓ 1.02x
cli-2.11.1 1.803s ± 0.011s ▓ 1.03x
cli-2.12.0 1.810s ± 0.009s ▓▓ 1.03x
cli-2.12.2 1.813s ± 0.020s ▓▓ 1.04x
cli-2.13.0 1.822s ± 0.007s ▓▓ 1.04x
cli-2.14.1 1.828s ± 0.013s ▓▓ 1.04x
cli-2.14.2 1.795s ± 0.008s ▓ 1.03x
cli-2.19.2 1.809s ± 0.010s ▓ 1.03x
cli-2.24.1 1.808s ± 0.007s ▓ 1.03x
cli-2.25.0 1.808s ± 0.006s ▓ 1.03x
cli-2.25.4 1.814s ± 0.005s ▓▓ 1.04x
cli-2.27.0 1.809s ± 0.006s ▓▓ 1.03x
cli-2.30.2 1.849s ± 0.004s ▓▓ 1.06x
cli-latest 1.843s ± 0.018s ▓▓ 1.05x
cli-next 1.839s ± 0.009s ▓▓ 1.05x

@AlbinaBlazhko17 AlbinaBlazhko17 added performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. and removed performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. labels May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.838s ± 0.011s ▓ 1.01x
cli-2.03.1 1.815s ± 0.009s ▓ 1.00x (Fastest)
cli-2.08.0 1.877s ± 0.014s ▓▓ 1.03x
cli-2.11.1 1.874s ± 0.017s ▓ 1.03x
cli-2.12.0 1.875s ± 0.014s ▓ 1.03x
cli-2.12.2 1.881s ± 0.011s ▓▓ 1.04x
cli-2.13.0 1.868s ± 0.004s ▓ 1.03x
cli-2.14.1 1.893s ± 0.006s ▓▓ 1.04x
cli-2.14.2 1.852s ± 0.011s ▓ 1.02x
cli-2.19.2 1.858s ± 0.015s ▓ 1.02x
cli-2.24.1 1.864s ± 0.008s ▓ 1.03x
cli-2.25.0 1.876s ± 0.009s ▓▓ 1.03x
cli-2.25.4 1.863s ± 0.008s ▓ 1.03x
cli-2.27.0 1.878s ± 0.006s ▓▓ 1.03x
cli-2.30.2 1.910s ± 0.012s ▓▓ 1.05x
cli-latest 1.904s ± 0.006s ▓▓ 1.05x
cli-next 1.906s ± 0.010s ▓▓ 1.05x

@AlbinaBlazhko17 AlbinaBlazhko17 added performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. and removed performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. labels May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.929s ± 0.017s ▓ 1.01x
cli-2.03.1 1.916s ± 0.017s ▓ 1.00x (Fastest)
cli-2.08.0 1.974s ± 0.028s ▓ 1.03x
cli-2.11.1 1.978s ± 0.016s ▓ 1.03x
cli-2.12.0 1.963s ± 0.009s ▓ 1.02x
cli-2.12.2 1.994s ± 0.011s ▓▓ 1.04x
cli-2.13.0 2.000s ± 0.012s ▓▓ 1.04x
cli-2.14.1 1.993s ± 0.016s ▓▓ 1.04x
cli-2.14.2 1.933s ± 0.019s ▓ 1.01x
cli-2.19.2 1.949s ± 0.024s ▓ 1.02x
cli-2.24.1 1.960s ± 0.014s ▓ 1.02x
cli-2.25.0 1.970s ± 0.026s ▓ 1.03x
cli-2.25.4 1.990s ± 0.012s ▓▓ 1.04x
cli-2.27.0 1.962s ± 0.006s ▓ 1.02x
cli-2.30.2 2.008s ± 0.018s ▓▓ 1.05x
cli-latest 1.993s ± 0.004s ▓▓ 1.04x
cli-next 2.008s ± 0.011s ▓▓ 1.05x

@AlbinaBlazhko17 AlbinaBlazhko17 self-assigned this May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.851s ± 0.015s ▓ 1.00x (Fastest)
cli-2.11.1 1.893s ± 0.018s ▓ 1.02x
cli-2.13.0 1.885s ± 0.004s ▓ 1.02x
cli-2.14.2 1.882s ± 0.012s ▓ 1.02x
cli-2.27.0 1.895s ± 0.003s ▓ 1.02x
cli-2.30.2 1.939s ± 0.014s ▓▓ 1.05x
cli-2.31.0 1.940s ± 0.011s ▓▓ 1.05x
cli-latest 1.935s ± 0.009s ▓▓ 1.05x
cli-next 1.946s ± 0.016s ▓▓ 1.05x

@AlbinaBlazhko17 AlbinaBlazhko17 added performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. and removed performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

Bundle

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.886s ± 0.034s ▓ 1.01x
cli-2.11.1 1.889s ± 0.015s ▓ 1.01x
cli-2.13.0 1.893s ± 0.012s ▓ 1.01x
cli-2.14.2 1.872s ± 0.008s ▓ 1.00x (Fastest)
cli-2.27.0 1.897s ± 0.009s ▓ 1.01x
cli-2.30.2 1.953s ± 0.026s ▓▓ 1.04x
cli-2.31.0 1.926s ± 0.012s ▓ 1.03x
cli-latest 1.926s ± 0.004s ▓ 1.03x
cli-next 1.940s ± 0.010s ▓▓ 1.04x

Lint

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 3.478s ± 0.024s ▓▓▓ 1.08x
cli-2.11.1 3.613s ± 0.011s ▓▓▓▓ 1.13x
cli-2.13.0 3.585s ± 0.020s ▓▓▓▓ 1.12x
cli-2.14.2 3.480s ± 0.021s ▓▓▓ 1.08x
cli-2.27.0 3.211s ± 0.009s ▓ 1.00x (Fastest)
cli-2.30.2 3.295s ± 0.020s ▓ 1.03x
cli-2.31.0 3.251s ± 0.012s ▓ 1.01x
cli-latest 3.249s ± 0.012s ▓ 1.01x
cli-next 3.234s ± 0.012s ▓ 1.01x

@AlbinaBlazhko17 AlbinaBlazhko17 added performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. and removed performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance. labels May 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

Bundle

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.898s ± 0.022s ▓ 1.01x
cli-2.11.1 1.920s ± 0.011s ▓ 1.02x
cli-2.13.0 1.921s ± 0.015s ▓ 1.02x
cli-2.14.2 1.886s ± 0.011s ▓ 1.00x (Fastest)
cli-2.27.0 1.923s ± 0.017s ▓ 1.02x
cli-2.30.2 1.962s ± 0.020s ▓▓ 1.04x
cli-2.31.0 1.959s ± 0.021s ▓▓ 1.04x
cli-latest 1.967s ± 0.020s ▓▓ 1.04x
cli-next 1.965s ± 0.010s ▓▓ 1.04x

Lint

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 3.511s ± 0.032s ▓▓▓ 1.08x
cli-2.11.1 3.645s ± 0.018s ▓▓▓▓ 1.12x
cli-2.13.0 3.577s ± 0.017s ▓▓▓ 1.10x
cli-2.14.2 3.479s ± 0.017s ▓▓ 1.07x
cli-2.27.0 3.266s ± 0.011s ▓ 1.00x (Fastest)
cli-2.30.2 3.308s ± 0.011s ▓ 1.01x
cli-2.31.0 3.273s ± 0.010s ▓ 1.00x
cli-latest 3.269s ± 0.016s ▓ 1.00x
cli-next 3.266s ± 0.024s ▓ 1.00x

@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

Bundle

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.839s ± 0.021s ▓ 1.01x
cli-2.11.1 1.850s ± 0.011s ▓ 1.01x
cli-2.13.0 1.870s ± 0.010s ▓ 1.02x
cli-2.14.2 1.827s ± 0.002s ▓ 1.00x (Fastest)
cli-2.27.0 1.851s ± 0.011s ▓ 1.01x
cli-2.30.2 1.895s ± 0.012s ▓▓ 1.04x
cli-2.31.0 1.886s ± 0.014s ▓ 1.03x
cli-latest 1.868s ± 0.022s ▓ 1.02x
cli-next 1.883s ± 0.008s ▓ 1.03x

Lint

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 3.447s ± 0.019s ▓▓▓▓ 1.11x
cli-2.11.1 3.518s ± 0.026s ▓▓▓▓ 1.13x
cli-2.13.0 3.469s ± 0.011s ▓▓▓▓ 1.12x
cli-2.14.2 3.386s ± 0.027s ▓▓▓ 1.09x
cli-2.27.0 3.108s ± 0.021s ▓ 1.00x (Fastest)
cli-2.30.2 3.154s ± 0.013s ▓ 1.01x
cli-2.31.0 3.115s ± 0.012s ▓ 1.00x
cli-latest 3.124s ± 0.016s ▓ 1.01x
cli-next 3.113s ± 0.010s ▓ 1.00x

@AlbinaBlazhko17 AlbinaBlazhko17 marked this pull request as ready for review May 27, 2026 07:42
@AlbinaBlazhko17 AlbinaBlazhko17 requested a review from a team as a code owner May 27, 2026 07:42
@AlbinaBlazhko17 AlbinaBlazhko17 changed the title chore: upgrade the benchmark chore: upgrade performance benchmark May 27, 2026
Comment thread tests/performance/make-test-command.sh Outdated
LINT_CMDS=$(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file'\''")' | jq 'join(" ")' | xargs)

# Lint --prepare wipes the ignore file each run so iterations do equal work:
echo "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 ${BUNDLE_CMDS} --export-markdown benchmark_bundle.md --export-json benchmark_bundle.json && REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 --prepare 'rm -f api-definitions/.redocly.lint-ignore.yaml' ${LINT_CMDS} --export-markdown benchmark_lint.md --export-json benchmark_lint.json" > test-command.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& skips lint if bundle fails on any version. Intentional? ; would keep them independent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but if bundle files we need to immediately fix the issue and then re-run a benchmark.

Comment thread tests/performance/make-test-command.sh Outdated
LINT_CMDS=$(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file'\''")' | jq 'join(" ")' | xargs)

# Lint --prepare wipes the ignore file each run so iterations do equal work:
echo "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 ${BUNDLE_CMDS} --export-markdown benchmark_bundle.md --export-json benchmark_bundle.json && REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 --prepare 'rm -f api-definitions/.redocly.lint-ignore.yaml' ${LINT_CMDS} --export-markdown benchmark_lint.md --export-json benchmark_lint.json" > test-command.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment on why we use warmup=2

# `labeled` lets applying the `performance-benchmark` label trigger a rerun
# without needing an empty commit; the job-level `if` filters out unrelated
# label changes so we don't burn CI on every label add.
types: [opened, synchronize, reopened, labeled]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really think we need to rerun benchmarks too often. Most of the time the current flow is sufficient to see if there's a noticeable difference in perf. If you decide to leave the labeling though, please remove the comments as they explain a trivial case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in workflow was introduced only for testing purposes for this PR, i will remove this after PR will be approved. I left note in the description of PR regarding it.

if: github.head_ref == 'changeset-release/main'
# Runs on the release PR (changeset-release/main) automatically, or on
# any PR carrying the `performance-benchmark` label for opt-in deep-dive.
if: github.head_ref == 'changeset-release/main' || contains(github.event.pull_request.labels.*.name, 'performance-benchmark')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I'm not sure how useful is to run the historical version benchmarks on individual PRs.

with:
file-path: tests/performance/benchmark_chart.md
comment-tag: historical-versions-comparison
comment-tag: ${{ contains(github.event.pull_request.labels.*.name, 'performance-benchmark') && format('historical-versions-rerun-{0}', github.run_id) || 'historical-versions-comparison' }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be needless if we remove the labeling approach. Am I right?

return sorted.length % 2 ? sorted[mid] : (sorted[mid - 1] + sorted[mid]) / 2;
};

const medianAbsoluteDeviation = (xs, centre) => median(xs.map((x) => Math.abs(x - centre)));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't hyperfine calculate the deviation already, does it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, i give it a try and found that hyperfine doesn't have MAD, only stddev.
Screenshot 2026-05-28 at 15 11 17

Comment thread tests/performance/package.json Outdated
"test:lint": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 3 'node node_modules/cli-latest/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file' 'node node_modules/cli-next/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file'",
"test:check-config": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 3 'node node_modules/cli-latest/bin/cli.js check-config --config=api-definitions/redocly.yaml --lint-config=warn' 'node node_modules/cli-next/bin/cli.js check-config --config=api-definitions/redocly.yaml --lint-config=warn'"
"test:bundle": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 'node node_modules/cli-latest/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml' 'node node_modules/cli-next/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml'",
"test:lint": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 2 --prepare 'rm -f api-definitions/.redocly.lint-ignore.yaml' 'node node_modules/cli-latest/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file' 'node node_modules/cli-next/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file'",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove rm -f api-definitions/.redocly.lint-ignore.yaml?

Copy link
Copy Markdown
Contributor Author

@AlbinaBlazhko17 AlbinaBlazhko17 May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially i have two approaches regarding generating lint-ignore file:

  1. Not to remove lint ignore file before every test run. In this case every time we will change existing file, which was generate in the first run. In my opinion it can produce artifacts in benchmark, because file size will be increased during testing due to various CLI versions can have different rules. As we want to be more accurate in benchmarks i discarded this variant.
  2. Remove previous lint ignore file and generate new one in every run. I pick this approach

"scripts": {
"chart": "node chart.js > benchmark_chart.md",
"make-test": "bash make-test-command.sh",
"test:bundle": "REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 3 'node node_modules/cli-latest/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml' 'node node_modules/cli-next/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml'",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't supposed to be committed 🙁.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed warmup 3 to 2, because we discussed, that initially we have warmup 1 and it will produce invalid results from time to time. Before my PR someone change this to 3. I decided to put 2 as the median and as we have additional lint command running we need to decrease time of benchmark run.

Comment thread tests/performance/make-test-command.sh Outdated
Comment on lines +9 to +10
BUNDLE_CMDS=$(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml'\''")' | jq 'join(" ")' | xargs)
LINT_CMDS=$(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js lint all@latest --config=api-definitions/redocly.yaml --generate-ignore-file'\''")' | jq 'join(" ")' | xargs)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's extract the common part and put specific options to line 13.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did this. Thanks, looks better.

@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

Bundle

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.822s ± 0.017s ▓ 1.00x (Fastest)
cli-2.11.1 1.870s ± 0.018s ▓ 1.03x
cli-2.13.0 1.876s ± 0.009s ▓ 1.03x
cli-2.14.2 1.841s ± 0.020s ▓ 1.01x
cli-2.27.0 1.868s ± 0.007s ▓ 1.03x
cli-2.30.2 1.907s ± 0.005s ▓▓ 1.05x
cli-2.31.0 1.901s ± 0.013s ▓▓ 1.04x
cli-latest 1.903s ± 0.016s ▓▓ 1.04x
cli-next 1.912s ± 0.007s ▓▓ 1.05x

Lint

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 3.424s ± 0.017s ▓▓▓ 1.08x
cli-2.11.1 3.535s ± 0.017s ▓▓▓▓ 1.11x
cli-2.13.0 3.488s ± 0.021s ▓▓▓ 1.10x
cli-2.14.2 3.406s ± 0.015s ▓▓▓ 1.07x
cli-2.27.0 3.172s ± 0.006s ▓ 1.00x (Fastest)
cli-2.30.2 3.239s ± 0.023s ▓ 1.02x
cli-2.31.0 3.210s ± 0.026s ▓ 1.01x
cli-latest 3.181s ± 0.014s ▓ 1.00x
cli-next 3.189s ± 0.010s ▓ 1.01x

@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

Bundle

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 1.874s ± 0.014s ▓ 1.00x (Fastest)
cli-2.11.1 1.897s ± 0.019s ▓ 1.01x
cli-2.13.0 1.916s ± 0.007s ▓ 1.02x
cli-2.14.2 1.892s ± 0.007s ▓ 1.01x
cli-2.27.0 1.930s ± 0.018s ▓ 1.03x
cli-2.30.2 1.949s ± 0.017s ▓▓ 1.04x
cli-2.31.0 1.933s ± 0.014s ▓ 1.03x
cli-latest 1.945s ± 0.006s ▓▓ 1.04x
cli-next 1.945s ± 0.012s ▓▓ 1.04x

Lint

CLI Version Median Time ± MAD (s) Relative Performance (Lower is Faster)
cli-2.0.0 3.510s ± 0.013s ▓▓▓ 1.09x
cli-2.11.1 3.590s ± 0.013s ▓▓▓▓ 1.12x
cli-2.13.0 3.557s ± 0.015s ▓▓▓▓ 1.11x
cli-2.14.2 3.447s ± 0.016s ▓▓▓ 1.07x
cli-2.27.0 3.241s ± 0.012s ▓ 1.01x
cli-2.30.2 3.270s ± 0.019s ▓ 1.02x
cli-2.31.0 3.229s ± 0.015s ▓ 1.00x
cli-latest 3.219s ± 0.014s ▓ 1.00x (Fastest)
cli-next 3.238s ± 0.016s ▓ 1.01x

Comment thread tests/performance/make-test-command.sh Outdated
# Store the command into a text file:
echo REDOCLY_SUPPRESS_UPDATE_NOTICE=true hyperfine --warmup 1 $(cat package.json | jq '.dependencies' | jq 'keys' | jq 'map("'\''node node_modules/" + . + "/bin/cli.js bundle all@latest --config=api-definitions/redocly.yaml'\''")' | jq 'join(" ")' | xargs) --export-markdown benchmark_check.md --export-json benchmark_check.json > test-command.txt
build_cmds() {
jq -r --arg sub "$1" --arg extra "${2:-}" '.dependencies | keys | map("'\''node node_modules/" + . + "/bin/cli.js " + $sub + " all@latest --config=api-definitions/redocly.yaml" + $extra + "'\''") | join(" ")' package.json
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss how to make it simpler.

Comment thread tests/performance/chart.js Outdated
Comment on lines +20 to +21
const json = JSON.parse(fs.readFileSync(jsonPath, 'utf8'));
const rows = json.results.map((r) => [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use destruction

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9a61a65. Configure here.

Comment thread tests/performance/chart.js Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

CLI Version Bundle Lint Check Config
cli-2.0.0 ▓ 1.00x (Fastest) ▓▓▓ 1.09x ± 0.01 ▓ 1.00x (Fastest)
cli-2.11.1 ▓ 1.03x ± 0.01 ▓▓▓▓ 1.12x ± 0.01 ▓ 1.01x ± 0.00
cli-2.13.0 ▓ 1.02x ± 0.01 ▓▓▓▓ 1.10x ± 0.01 ▓ 1.03x ± 0.00
cli-2.14.2 ▓ 1.01x ± 0.01 ▓▓▓ 1.07x ± 0.01 ▓ 1.02x ± 0.00
cli-2.27.0 ▓ 1.03x ± 0.01 ▓ 1.01x ± 0.01 ▓▓ 1.06x ± 0.01
cli-2.30.2 ▓▓ 1.05x ± 0.01 ▓ 1.02x ± 0.01 ▓▓▓ 1.08x ± 0.01
cli-2.31.0 ▓▓ 1.04x ± 0.01 ▓ 1.01x ± 0.01 ▓▓ 1.07x ± 0.01
cli-latest ▓▓ 1.04x ± 0.01 ▓ 1.00x (Fastest) ▓▓▓ 1.07x ± 0.01
cli-next ▓▓ 1.05x ± 0.01 ▓ 1.00x ± 0.01 ▓▓ 1.06x ± 0.01

@github-actions
Copy link
Copy Markdown
Contributor

Performance Benchmark

CLI Version Bundle Lint Check Config
cli-2.0.0 ▓ 1.00x ± 0.01 ▓▓▓ 1.08x ± 0.01 ▓ 1.00x (Fastest)
cli-2.11.1 ▓ 1.02x ± 0.01 ▓▓▓▓ 1.11x ± 0.01 ▓ 1.00x ± 0.01
cli-2.13.0 ▓ 1.02x ± 0.01 ▓▓▓ 1.10x ± 0.01 ▓ 1.01x ± 0.01
cli-2.14.2 ▓ 1.00x (Fastest) ▓▓▓ 1.07x ± 0.01 ▓ 1.01x ± 0.01
cli-2.27.0 ▓ 1.03x ± 0.01 ▓ 1.01x ± 0.01 ▓▓ 1.04x ± 0.01
cli-2.30.2 ▓▓ 1.04x ± 0.00 ▓ 1.02x ± 0.01 ▓▓ 1.06x ± 0.01
cli-2.31.0 ▓▓ 1.05x ± 0.01 ▓ 1.00x ± 0.01 ▓▓ 1.05x ± 0.01
cli-latest ▓ 1.03x ± 0.01 ▓ 1.00x (Fastest) ▓▓ 1.05x ± 0.01
cli-next ▓ 1.03x ± 0.01 ▓ 1.00x ± 0.01 ▓▓ 1.05x ± 0.01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance-benchmark Posts a new performance benchmark comment per push instead of overwriting; for comparing variance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants