Skip to content

Add component size benchmark runner, generated reports, and GitHub Action#128

Draft
developit wants to merge 1 commit into
mainfrom
codex/calculate-compiled-js-size-for-kinu-components
Draft

Add component size benchmark runner, generated reports, and GitHub Action#128
developit wants to merge 1 commit into
mainfrom
codex/calculate-compiled-js-size-for-kinu-components

Conversation

@developit

Copy link
Copy Markdown
Owner

Motivation

  • Provide automated per-component size measurement, shared-cost estimation, and Shapley attribution to help prioritize bundle-size optimizations.
  • Produce a standalone HTML viewer and machine-readable artifacts so size data can be inspected and consumed by tooling.
  • Integrate the measurement into CI so reports are generated on PRs and pushes and uploaded as build artifacts.

Description

  • Add a new benchmark runner benchmarks/size/run-components.mjs that bundles component groups, measures raw/gzip/brotli sizes, computes shared overlaps and sampled Shapley attributions, and emits viewer + JSON/MD artifacts.
  • Add generated report artifacts under benchmarks/size/results/: components.html, components.md, components.json, components.sankey.json, and components.shapley.json.
  • Add a package script bench:size:components in package.json to run the new measurement (node benchmarks/size/run-components.mjs).
  • Add a GitHub Actions workflow .github/workflows/component-size.yml that installs dependencies, runs pnpm bench:size:components, and uploads the generated reports as the kinu-component-size-report artifact.

Testing

  • Ran the measurement via pnpm bench:size:components (invokes node benchmarks/size/run-components.mjs) which completed successfully and produced the files in benchmarks/size/results/ including components.html, components.md, and components.json.
  • The CI workflow is configured to run pnpm install --frozen-lockfile and pnpm bench:size:components and to upload the artifacts; no unit tests were modified or added as part of this change.
  • No automated unit/integration tests were added for the benchmarking tooling itself in this PR.

Codex Task

@netlify

netlify Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy Preview for kinu-sh ready!

Name Link
🔨 Latest commit 76d1cac
🔍 Latest deploy log https://app.netlify.com/projects/kinu-sh/deploys/6a31444ccefafe0008901008
😎 Deploy Preview https://deploy-preview-128--kinu-sh.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 37.7 kB

ℹ️ View Unchanged
Filename Size
benchmarks/size/.tmp/few-components/bundle.css 3.03 kB
benchmarks/size/.tmp/few-components/bundle.js 637 B
benchmarks/size/.tmp/nearly-all-components/bundle.css 10.9 kB
benchmarks/size/.tmp/nearly-all-components/bundle.js 4 kB
benchmarks/size/.tmp/one-component/bundle.css 1.52 kB
benchmarks/size/.tmp/one-component/bundle.js 341 B
dist/index.css 10.9 kB
dist/index.js 6.34 kB

compressed-size-action

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant