Repository navigation
docs: show the error and page-load benchmark charts on the landing page and README - #246
Merged
Merged
Conversation
The landing page shows two cards below the hero: the error benchmark, sorted by mistakes reported before the app runs, and the second-load page time. Both reuse the Benchmarks page chart components: the error chart gains a sort="static" option and the speed chart a show_table option. The README gets the error chart as light and dark PNGs drawn by docs_site/scripts/benchmark_images.py. The files are named by benchmark run and image hash and are never overwritten. A new readme_benchmark_charts validator rebuilds the README block from the data. published_readme_links now reads whole files, so it also catches relative paths in multi-line tags, srcset, and HTML links. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The landing charts now differ from the Benchmarks page, which is
unchanged. Each chart sits under a section heading ("Catch mistakes
early", "As fast as Next.js") with its legend below the bars. The error
chart counts only the mistakes that apply to each framework ("54 of
61"), sorted by that share, and the speed chart shows one total bar per
framework, fastest first, with no groups. Both come from new options on
the existing components (sort, scale, short_names, phases, compact).
The existing "Catch mistakes early." section is renamed "No silent
failures." so the two headings do not clash. The README block and its
images are redrawn with the same options; the earlier image pair never
reached main, so it is removed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The two benchmark sections now sit between the sponsor belt and the tutorial video, with the same room above them as below. Co-Authored-By: Claude Opus 5.5 <[email protected]>
"Catch mistakes early" now comes first, full width, and "As fast as Next.js" follows as its own block. Both cards span the page's 76rem column like its other blocks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The README chart names the Citry version its run measured, from VERSION_NOTES in benchmark_readme.py; the validator fails on a run without a note. - The README alt text uses the same short names as the image. - static_shares refuses an unknown status and a missing, repeated, or stray record, as the chart does. - The dashed line follows the bars' scale with scale="applicable". - A compact chart keeps its legend above the table. - The landing design doc names "No silent failures." as the reliability heading; the landing page comment lists the hand-typed values to recheck after a new run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mment Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shows the benchmark results on the docs landing page and early in the README, as decided in the presentation study (mockup D, revised).
Landing page
Two cards sit below the unchanged hero. They're side by side on wide screens and stack below 1,100 px. There are no tabs, no title over both cards, and no AI card.
"Catch mistakes before the app runs":
sort="static"option on<c-error-benchmark-chart>."Page load time":
<c-benchmark-chart load="second" c-show_table="False">.Each card ends with a "How we measured" link to the Benchmarks page.
README
README.mdis also what PyPI shows. Right after the links line, it gets:<picture>element with dark and light images;All URLs are absolute.
docs_site/scripts/benchmark_images.pydraws the images with the same chart markup and the site's CSS. It saves them underdocs/assets/benchmarks/, with the run id and a content hash in each file name, and it never overwrites an existing file. That matters because published PyPI pages keep loading their image URLs.docs/codebase.mdexplains when to rerun it.Validators
published_readme_linksnow reads each file whole. It catches relative paths in multi-line HTML tags, insrcset, and inhrefandposter. The old version missed all three.readme_benchmark_charts: it rebuilds the README block from the benchmark data. It fails when the run, the counts or an image don't match, when an image was changed in place, or when the markers are broken. It needs only the standard library.Evidence
scripts/validate.py, ruff and mypy.Note
The numbers come from the current Benchmarks run, which measured the code that ships as Citry 0.6.1. They go live with this merge, and the release is what makes them true for
pip install citry.🤖 Generated with Claude Code