-
Notifications
You must be signed in to change notification settings - Fork 0
docs: Fix benchmark chart naming and add data migration script #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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)
There was a problem hiding this 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.pyto merge legacy chart sets into the new chart names. - Update
docs/benchmarks.mdto 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. |
| # 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) |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
|
|
||
| # Sort each entry list by date | ||
| for name in entries: | ||
| entries[name].sort(key=lambda e: e.get("date", 0)) |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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.
| entries[name].sort(key=lambda e: e.get("date", 0)) | |
| entries[name].sort(key=lambda e: e.get("date", "")) |
| ### 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/`) |
Copilot
AI
Feb 9, 2026
There was a problem hiding this comment.
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).
| ### 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`) |
📝 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
7bd08a2from:This caused
github-action-benchmarkto 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
b3b8465): Merged historical data from old chart sets into new ones using the fix scriptdocs/benchmarks.mdto reflect the new naming and benchmark categoriesscripts/fix-benchmark-data.pyfor future migrations🔗 Related Issues
N/A - discovered during routine monitoring
✅ Type of Change
🧪 Testing
Test Coverage
Testing Details
https://raw.githubusercontent.com/Picea/Abies/gh-pages/dev/bench/data.jsand confirmed merge was successful✨ 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 sectionscripts/fix-benchmark-data.py: New utility script to merge benchmark chart data between name changes🔍 Code Review Checklist