Skip to content

Add CodSpeed performance benchmarks - #414

Closed
codspeed[bot] wants to merge 3 commits into
masterfrom
codspeed-wizard-1773399522921
Closed

codspeed[bot] wants to merge 3 commits into
masterfrom
codspeed-wizard-1773399522921

Conversation

@codspeed

@codspeed codspeed Bot commented Mar 13, 2026

Copy link
Copy Markdown

Summary

This PR sets up continuous performance testing for htmlnano using CodSpeed with vitest benchmarks.

Changes

  • Benchmark suite (bench/htmlnano.bench.ts): 9 benchmarks covering the core minification pipeline:
    • Safe preset: small, medium, and large HTML documents
    • Max preset: small, medium, and large HTML documents
    • Individual modules: collapseWhitespace, removeComments, and minifyJs in isolation
  • Vitest configuration (vitest.config.mts): Configured with the @codspeed/vitest-plugin for CodSpeed integration. Includes a small Vite transform plugin to handle the existing module.exports compatibility shim in src/index.ts when running under ESM.
  • CI workflow (.github/workflows/codspeed.yml): GitHub Actions workflow that runs benchmarks on pushes to master, pull requests, and manual dispatches. Uses OIDC authentication and simulation mode.
  • README badge: Added CodSpeed performance badge alongside existing badges.

Dependencies added

  • vitest (dev)
  • @codspeed/vitest-plugin (dev)

Next steps

  • Once merged, CodSpeed will start tracking performance on every PR and push to master.
  • Performance regressions will be reported directly on pull requests.
  • Visit the CodSpeed dashboard to view results and configure thresholds.

@netlify

netlify Bot commented Mar 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for htmlnano canceled.

Name Link
🔨 Latest commit 31d78a2
🔍 Latest deploy log https://app.netlify.com/projects/htmlnano/deploys/69b3f237332fd50008b0d682

@codspeed
codspeed Bot force-pushed the codspeed-wizard-1773399522921 branch from 7da1f27 to 2c159ae Compare March 13, 2026 11:13
@codspeed

codspeed Bot commented Mar 13, 2026 •

Copy link
Copy Markdown
Author

Congrats! CodSpeed is installed 🎉

🆕 9 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

@codspeed
codspeed Bot force-pushed the codspeed-wizard-1773399522921 branch from 0b8a84e to 31d78a2 Compare March 13, 2026 11:17
@codspeed
codspeed Bot marked this pull request as ready for review March 13, 2026 11:20
@maltsev maltsev closed this May 16, 2026
@maltsev

maltsev commented May 16, 2026

Copy link
Copy Markdown
Owner

This was a PoC. It works, but I think it isn't really needed at this point. We might get back to it later, though.

@maltsev
maltsev deleted the codspeed-wizard-1773399522921 branch July 25, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant