Skip to content

Conversation

@MCGPPeters
Copy link
Contributor

📝 Description

What

Fixes the benchmark chart naming mismatch on GitHub Pages and adds a utility script for future data migrations.

Why

The benchmark chart names were changed in commit 7bd08a2 from:

  • "Virtual DOM Benchmarks" → "Rendering Engine Throughput"
  • "Virtual DOM Allocations" → "Rendering Engine Allocations"

This caused github-action-benchmark to create new chart sets while the old ones stopped receiving updates. The interactive charts at https://picea.github.io/Abies/dev/bench/ showed 4 separate charts (2 stale + 2 current) instead of 2 unified charts with complete history.

How

  1. gh-pages fix (already applied in commit b3b8465): Merged historical data from old chart sets into new ones using the fix script
  2. Documentation update: Updated docs/benchmarks.md to reflect the new naming and benchmark categories
  3. Utility script: Added scripts/fix-benchmark-data.py for future migrations

🔗 Related Issues

N/A - discovered during routine monitoring

✅ Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature causing existing functionality to change)
  • 📚 Documentation update
  • 🧹 Code refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test update

🧪 Testing

Test Coverage

  • Verified gh-pages data.js shows merged chart sets (15 + 9 entries)
  • Verified raw data.js on GitHub shows only "Rendering Engine Throughput" and "Rendering Engine Allocations"

Testing Details

  • Fetched https://raw.githubusercontent.com/Picea/Abies/gh-pages/dev/bench/data.js and confirmed merge was successful
  • GitHub Pages CDN may take a few minutes to refresh cached version

✨ Changes Made

  • docs/benchmarks.md: Updated title from "Virtual DOM Benchmarks" to "Rendering Engine Benchmarks", added documentation for 3 benchmark categories (Diffing, Rendering, Handlers), updated Architecture section
  • scripts/fix-benchmark-data.py: New utility script to merge benchmark chart data between name changes

🔍 Code Review Checklist

  • Code follows the project's style guidelines
  • Self-review of code performed
  • Code changes generate no new warnings
  • Documentation updated

The benchmark chart names were changed in commit 7bd08a2 from:
- 'Virtual DOM Benchmarks' → 'Rendering Engine Throughput'
- 'Virtual DOM Allocations' → 'Rendering Engine Allocations'

This caused the github-action-benchmark to create new chart sets while
the old ones stopped receiving updates. The fix has been applied to
gh-pages (commit b3b8465) to merge historical data.

Changes:
- Update docs/benchmarks.md to reflect new naming (3 benchmark categories)
- Add scripts/fix-benchmark-data.py for merging chart set data
- Document the new benchmark categories (Diffing, Rendering, Handlers)
Copilot AI review requested due to automatic review settings February 9, 2026 21:55
Copy link

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

Updates benchmark documentation to reflect the new GitHub Pages chart naming and introduces a small migration utility to merge historical github-action-benchmark chart data when chart names change.

Changes:

  • Add scripts/fix-benchmark-data.py to merge legacy chart sets into the new chart names.
  • Update docs/benchmarks.md to rename the benchmarks doc and describe benchmark categories.
  • Refresh the benchmarks “Architecture” section to list the benchmark entry points.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
scripts/fix-benchmark-data.py New Python utility to merge old github-action-benchmark entry sets into renamed chart sets.
docs/benchmarks.md Updates benchmark documentation naming and structure, and adds category overview.

Comment on lines +22 to +31
# Read the data.js file
content = Path(input_file).read_text()

# Remove the JavaScript wrapper
if content.startswith("window.BENCHMARK_DATA = "):
json_str = content.replace("window.BENCHMARK_DATA = ", "", 1)
else:
json_str = content

data = json.loads(json_str)
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

Path(input_file).read_text() uses the platform default encoding and can fail on machines where data.js contains non-ASCII characters (e.g., the ± symbols you mention). Read with an explicit UTF-8 encoding, and consider stripping an optional trailing semicolon/newline after removing the window.BENCHMARK_DATA = prefix so json.loads() works with the common ... = {...}; form too.

Copilot uses AI. Check for mistakes.

# Sort each entry list by date
for name in entries:
entries[name].sort(key=lambda e: e.get("date", 0))
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The sort key uses e.get("date", 0). If any entry is missing date, this returns an int while other entries likely have a string/ISO date, and Python will raise a TypeError when sorting mixed key types. Use a consistent key type (e.g., empty string default, or parse dates to a numeric timestamp) to make the script robust to missing/invalid date values.

Suggested change
entries[name].sort(key=lambda e: e.get("date", 0))
entries[name].sort(key=lambda e: e.get("date", ""))

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +21
### DOM Diffing (`Abies.Benchmarks.Diffing/`)

Measures the Virtual DOM diffing algorithm performance.

### Rendering (`Abies.Benchmarks.Rendering/`)

Measures HTML string rendering performance.

### Event Handlers (`Abies.Benchmarks.Handlers/`)
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

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

The category headings reference directories like Abies.Benchmarks.Diffing/, Abies.Benchmarks.Rendering/, and Abies.Benchmarks.Handlers/, but the repository’s benchmarks appear to be a single Abies.Benchmarks/ project with DomDiffingBenchmarks.cs, RenderingBenchmarks.cs, and EventHandlerBenchmarks.cs (no such subfolders). Update these references to match the actual structure (e.g., point at the benchmark classes/files, or the workflow artifact folders benchmark-results/diffing|rendering|handlers).

Suggested change
### DOM Diffing (`Abies.Benchmarks.Diffing/`)
Measures the Virtual DOM diffing algorithm performance.
### Rendering (`Abies.Benchmarks.Rendering/`)
Measures HTML string rendering performance.
### Event Handlers (`Abies.Benchmarks.Handlers/`)
### DOM Diffing (`Abies.Benchmarks/DomDiffingBenchmarks.cs`)
Measures the Virtual DOM diffing algorithm performance.
### Rendering (`Abies.Benchmarks/RenderingBenchmarks.cs`)
Measures HTML string rendering performance.
### Event Handlers (`Abies.Benchmarks/EventHandlerBenchmarks.cs`)

Copilot uses AI. Check for mistakes.
@MCGPPeters MCGPPeters merged commit 71c2641 into main Feb 10, 2026
18 of 19 checks passed
@MCGPPeters MCGPPeters deleted the docs/fix-benchmark-chart-naming branch February 10, 2026 08:42
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