Interactive browser viewer for Google Benchmark JSON output.
It helps you inspect benchmark groups, compare two runs, map name tokens to chart dimensions, and review both charts and raw values in one place.
- Load Google Benchmark JSON by drag and drop or file picker.
- Automatic grouping by benchmark name prefix (everything before first
/). - Name Mapping Studio for token-role assignment (
subtype,series,x axis). - Multiple chart types and display controls.
- Filter controls for subtype levels.
- Raw grouped data tables.
- Compare mode for base vs compare benchmark files.
- CPU and Wall time switching.
- Theme toggle (light/dark).
No build step is required.
- Clone this repository.
- Open
index.htmlin a browser, or serve the project with a static server.
Example static server command:
python3 -m http.server 8000Then open http://localhost:8000.
The viewer expects a Google Benchmark JSON payload that contains a benchmarks array.
It reads and normalizes:
namereal_time/cpu_timewithtime_unitreal_time_ns/cpu_time_ns(if already present)- benchmark rows flagged as
is_aggregateare ignored
The tool also copies any *_per_second fields into counters when needed.
Generate JSON from Google Benchmark with:
./your_benchmark_binary --benchmark_format=json --benchmark_out=bench_results.jsonThis viewer uses benchmark names heavily to build the UI and chart dimensions.
Expected shape:
GroupName/token1/token2/token3/...
Rules:
GroupName(before the first/) becomes a tab.- Tokens after
/become mappable segments. - Numeric tokens are treated as numbers where relevant.
- String tokens are supported and can be used for subtype or series labels.
Example names:
BM_OffsetList/avx2/64/insert/1024
BM_OffsetList/avx2/64/erase/1024
BM_OffsetList/scalar/64/insert/1024
BM_OffsetList/scalar/64/erase/1024
In this example:
BM_OffsetListis the group tab.avx2|scalarcan be mapped as subtype or series.64can be subtype/series/x depending on your mapping.insert|erasecan be mapped as series.1024is a common candidate for x axis.
You can load a second file with Compare after loading a base file.
Important behavior:
- Compare data is matched by exact benchmark
name. - If names don't precisely overlap, compare mode is rejected.
- UI shows base and compare values together where possible.
Tip: keep benchmark naming stable across runs if you plan to compare them.
- Load base benchmark JSON.
- Open a group tab.
- In Name Mapping Studio, assign token roles.
- Role meanings:
Subtype Ncreates hierarchical filter buckets. - Role meanings:
Seriescreates separate chart series. - Role meanings:
X axisdefines x-axis source. - Adjust graph type, log scaling, and focus settings.
- Optionally load compare JSON.
- Inspect chart cards and raw grouped table.
Top-level layout:
index.html: app shell.css/: split stylesheet modules (base,panels, chart/data UI sections).js/main.js: entrypoint and wiring.js/app/: app state, theme, data normalization, viewer rendering.js/panels/: mapping studio, chart-grid builders, filters, raw table.js/charts/: Chart.js wrappers and theme helpers.js/utils/: parsing and formatting utilities.
- The app is plain HTML/CSS/JS modules.
- Charting is powered by Chart.js loaded from CDN in
index.html. - No bundler or package manager is currently required.
See LICENSE for details.