Skip to content

Add CodSpeed performance benchmarks#414

Open
codspeed-hq[bot] wants to merge 3 commits intomasterfrom
codspeed-wizard-1773399522921
Open

Add CodSpeed performance benchmarks#414
codspeed-hq[bot] wants to merge 3 commits intomasterfrom
codspeed-wizard-1773399522921

Conversation

@codspeed-hq
Copy link
Copy Markdown

@codspeed-hq codspeed-hq bot commented Mar 13, 2026

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
Copy link
Copy Markdown

netlify bot commented Mar 13, 2026

Deploy Preview for htmlnano canceled.

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

@codspeed-hq codspeed-hq bot force-pushed the codspeed-wizard-1773399522921 branch from 7da1f27 to 2c159ae Compare March 13, 2026 11:13
@codspeed-hq
Copy link
Copy Markdown
Author

codspeed-hq bot commented Mar 13, 2026

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-hq codspeed-hq bot force-pushed the codspeed-wizard-1773399522921 branch from 0b8a84e to 31d78a2 Compare March 13, 2026 11:17
@codspeed-hq codspeed-hq bot marked this pull request as ready for review March 13, 2026 11:20
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.

0 participants