Skip to content

feat: rolling build performance baseline tracking#374

Open
Copilot wants to merge 4 commits into
masterfrom
copilot/create-baseline-for-build-times
Open

feat: rolling build performance baseline tracking#374
Copilot wants to merge 4 commits into
masterfrom
copilot/create-baseline-for-build-times

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

  • Create docs/build-baselines.json — stores last 4 baselines with detailed description for agents/maintainers
  • Add raw numeric outputs to tests/smoke/webpack.test.ts (build_time_ms, bundle_size_bytes)
  • Add raw numeric outputs to tests/smoke/eleventy.test.ts (build_time_ms, site_size_bytes)
  • Create .github/scripts/baseline-helpers.js — shared rollingAvg and deltaCell helpers
  • Create .github/scripts/update-baseline.js — validates every required metric individually (not just a combined zero-check); preserves description field when reading an existing baseline file; warns with metric names when any are missing
  • Create .github/workflows/on_push_update_baseline.yaml — triggers after successful master build, runs both smoke tests, updates baseline, commits with [skip ci]
  • Update on_pr_webpack_smoke.yaml — delta column vs rolling average, colour-coded thresholds
  • Update on_pr_eleventy_smoke.yaml — same delta display for Eleventy metrics
Original prompt

Can we create a baseline for the site build time in eleventy, the distribution build time and the distribution side size and with a little bit of explanation for further agents? This baseline is so that when we make new PRs we can see a delta either against the size all the time we can probably leave something about maybe keeping the last three or four baselines. We can have some kind of rolling average so we can tell whether it's just a bit of noise because there will be noise or if it's a major deviation in system.

Copilot AI changed the title [WIP] Add baseline tracking for site build time in Eleventy feat: rolling build performance baseline tracking Mar 31, 2026
Copilot AI requested a review from dannystaple March 31, 2026 14:23
@dannystaple dannystaple marked this pull request as ready for review March 31, 2026 20:34
Copilot AI review requested due to automatic review settings March 31, 2026 20:35
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

🔨 Webpack Bundle Smoke Test

Status ✅ Passed
Build Time 00:06.01
Bundle Size 320.8 KB

No baseline yet — will be recorded after the first successful push to master
Updated: Tue, 31 Mar 2026 20:49:07 GMT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

🏗️ Eleventy Site Build Smoke Test

Status ✅ Passed
Build Time 01:46.86
Site Size 369.0 MB
HTML Files 1393

No baseline yet — will be recorded after the first successful push to master
Updated: Tue, 31 Mar 2026 20:50:53 GMT

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds automated “rolling baseline” tracking so PR smoke-test comments can show build-time and output-size deltas vs recent master/main runs.

Changes:

  • Emit raw numeric metrics from webpack/eleventy smoke tests (*_ms, *_bytes) for machine-readable baseline capture.
  • Add baseline storage (docs/build-baselines.json) plus helper/update scripts to compute rolling averages and append new samples.
  • Update PR smoke-test workflows to render delta columns, and add a post-merge workflow to refresh baselines automatically.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/smoke/webpack.test.ts Adds raw numeric GitHub Actions outputs for build time and bundle size.
tests/smoke/eleventy.test.ts Adds raw numeric GitHub Actions outputs for build time and site size.
docs/build-baselines.json Introduces the rolling baseline data file and documentation for metrics/semantics.
.github/workflows/on_push_update_baseline.yaml New workflow to update baselines after successful master/main runs.
.github/workflows/on_pr_webpack_smoke.yaml PR comment now includes delta vs rolling baseline for webpack metrics.
.github/workflows/on_pr_eleventy_smoke.yaml PR comment now includes delta vs rolling baseline for eleventy metrics.
.github/scripts/update-baseline.js Appends/trims baseline entries and writes updated JSON to disk.
.github/scripts/baseline-helpers.js Shared rolling-average and delta-cell formatting helpers for workflows.

Comment thread .github/workflows/on_push_update_baseline.yaml Outdated
Comment thread .github/scripts/update-baseline.js
Comment thread .github/scripts/update-baseline.js Outdated
Comment thread docs/build-baselines.json Outdated
Comment thread .github/workflows/on_pr_webpack_smoke.yaml Outdated
Comment thread .github/workflows/on_pr_eleventy_smoke.yaml Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 31, 2026

MegaLinter analysis: Error

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 8 0 0 0.13s
✅ BASH bash-exec 1 0 0 0.01s
✅ BASH shellcheck 1 0 0 0.06s
✅ BASH shfmt 1 0 0 0.01s
❌ C cppcheck 8 8 0 0.43s
❌ CPP cppcheck 8 8 0 0.58s
✅ JSON npm-package-json-lint yes no no 0.67s
✅ JSON v8r 15 0 0 8.34s
✅ REPOSITORY gitleaks yes no no 20.48s
✅ REPOSITORY git_diff yes no no 0.13s
❌ REPOSITORY grype yes 2 no 61.2s
✅ REPOSITORY secretlint yes no no 65.91s
✅ REPOSITORY syft yes no no 4.05s
✅ REPOSITORY trivy-sbom yes no no 6.72s
✅ REPOSITORY trufflehog yes no no 52.46s
✅ TYPESCRIPT ts-standard 3 0 0 5.54s
✅ XML xmllint 1 0 0 181.28s
✅ YAML v8r 16 0 0 10.26s

Detailed Issues

❌ C / cppcheck - 8 errors
Results of cppcheck linter (version 2.18.3)
See documentation on https://megalinter.io/9.4.0/descriptors/c_cppcheck/
-----------------------------------------------

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^
❌ CPP / cppcheck - 8 errors
Results of cppcheck linter (version 2.18.3)
See documentation on https://megalinter.io/9.4.0/descriptors/cpp_cppcheck/
-----------------------------------------------

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h
    Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
    assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
    class SR04 {
    ^

❌ [ERROR] galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h
    Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
    galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
    class Motor {
    ^
❌ REPOSITORY / grype - 2 errors
[0000]  WARN no explicit name and version provided for directory source, deriving artifact ID from the given path (which is not ideal) from=syft
NAME                      INSTALLED                                 FIXED IN  TYPE           VULNERABILITY        SEVERITY  EPSS          RISK         
tj-actions/changed-files  HIDDEN_BY_MEGALINTER 46.0.1    github-action  GHSA-mrrh-fwg8-r2c3  High      92.0% (99th)  84.5  (kev)  
tj-actions/changed-files  HIDDEN_BY_MEGALINTER 41        github-action  GHSA-mcph-m25j-8j63  High      0.7% (71st)   0.5
[0060] ERROR discovered vulnerabilities at or above the severity threshold

See detailed reports in MegaLinter artifacts

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.4.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,C_CPPCHECK,CPP_CPPCHECK,JSON_V8R,JSON_NPM_PACKAGE_JSON_LINT,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_GRYPE,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,TYPESCRIPT_STANDARD,XML_XMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

3 participants