From b7ba4d79de5ed4f3f83301f0e32d769f2ce7522a Mon Sep 17 00:00:00 2001 From: Thomas Korrison Date: Mon, 27 Apr 2026 16:23:40 +0100 Subject: [PATCH 1/2] feat: introduce charts template for benchmark visualization - Added `charts_template.html`, `charts_template.css`, and `charts_template.js` to provide a structured and CSP-compliant interface for displaying benchmark results. - The new HTML template separates styles and scripts to enhance security and maintainability, ensuring no inline scripts or styles are used. - Implemented a loading mechanism that adapts based on JavaScript availability, improving user experience for both JS-enabled and disabled environments. - Updated the documentation to reflect the new charts structure and its integration with the benchmark suite. These changes enhance the observability of benchmark results and provide a more robust framework for visualizing performance metrics. --- bench-support/src/bin/charts_template.css | 179 ++++++ bench-support/src/bin/charts_template.html | 664 ++------------------- bench-support/src/bin/charts_template.js | 464 ++++++++++++++ bench-support/src/bin/render_docs.rs | 144 ++++- benches/reports.rs | 98 ++- benches/runner.rs | 56 +- benches/workloads.rs | 52 +- 7 files changed, 993 insertions(+), 664 deletions(-) create mode 100644 bench-support/src/bin/charts_template.css create mode 100644 bench-support/src/bin/charts_template.js diff --git a/bench-support/src/bin/charts_template.css b/bench-support/src/bin/charts_template.css new file mode 100644 index 0000000..fd86095 --- /dev/null +++ b/bench-support/src/bin/charts_template.css @@ -0,0 +1,179 @@ +/*! + * charts.css — sibling stylesheet for charts.html. + * Extracted so the page can run under `style-src 'self'` (no 'unsafe-inline'). + * + * Coordinated tokens with charts.html: + * - `.no-js #loading { display: none; }` cooperates with charts.js, which + * removes the `no-js` class on as its first action so the loading + * placeholder is hidden when scripting is disabled (a