Copyright (c) 2026 Antmicro
Self-contained single-page application for tracking RTL-to-GDSII build metrics of digital designs built with
OpenROAD. Measured runs are collected in CI, serialized with the Python tools in tools/ and rendered into a static page:
- Overview - cards for open pull requests and tracked branches, grouped by design configuration, each showing its latest run
- History - metric plots over time for the main branch
- Compare - two runs side by side with the diff between them
- Details - raw metrics of a single run
The build is a single HTML file (build/index.html) hostable on any static web server.
- Node.js >= 22 and npm (
enginesinmetrics_dashboard/package.json) - Python >= 3.10 with the tool dependencies:
pip install .orpip install ".[dev]"to also get the development tools (pytest, black, isort) - For the CI generation example below:
jqandenvsubst(GNU gettext)
Dashboard integration requires providing a configuration file (see sample-data/config.json) and, for every
measured run, a <metrics>.json metrics report with its accompanying <metrics>.metadata.json metadata file.
The configuration must be compatible with tools/schemas/config.schema.json. Paths are node names joined with
.; metadata fields are referenced with an @ prefix (e.g. @pr_title).
repository- (required) the tracked repository (owner/name); the runs are the branches pushed to it and the PRs targeting it (fork PRs included)labels- (required) flat map of node name (category or metric) or metadata field to the label displayed in the dashboard (e.g.tns->TNS)unit_types- (required) map of unit type to target unit (e.g.area->um^2,power->mW;""for unitless); metrics whose unit type has no entry are kept in their source unitsunit_types_file- (required) path, relative to the config file, of the unit-types file (tools/schemas/unit_types.schema.json, e.g.sample-data/units_flatmap.json): a flat map of metric paths to unit types (e.g.synthesis.modules.*.area->area). A*segment matches one or more node names; exact paths win over wildcards, then the ones with more literal segmentsmain_branch- (optional) branch used by default across the dashboard (history, run summaries, first on the overview); defaults tomainunits- (optional) map of metadata field to display unit (e.g.@frequency->MHz); metadata values are shown as-is, without conversionsummary- (optional) metric paths and metadata fields shown in the summary boxes of the history and comparison viewsoverview- (optional) metric paths and metadata fields shown on the overview cardsunplottable- (optional) categories or metrics excluded from plotting; a bare name matches that node anywhere in the hierarchy, a path matches that node and everything below itjobs- (optional) category holding CI job results, shown in the Jobs view as a grid of jobs by day of the main branch's runs: a tile is shaded by the day's pass rate and shows the day's passed/total count; a job's latest result sums up its newest day (flakyif it both passed and failed); a tile opens the day's results with links and the job's statistics; every job is a category with astatusmetric (passed,failed,canceled, ...), an optionalurlmetric linking to its log and an optionaldurationmetric, e.g.{"jobs": {"workflow": {"job_a": {"status": "passed", "url": "...", "duration": 61}}}}title- (optional) title of the dashboard's page,RTL to GDSII metricsby defaulthidden_tabs- (optional) views not shown in the dashboard, e.g.["overview", "history", "compare"]for a jobs-only dashboardretention_period- (optional) how long the runs are kept, counting from the build date, e.g.20 days,2 weeks,6 monthsor1 year; the older runs are removed during serialization
A run's metrics report and metadata file must be compatible with tools/schemas/metrics.schema.json and
tools/schemas/metadata.schema.json.
The metrics file consists of:
- a
unitsnode mapping each unit type to the unit the metrics are delivered in (e.g.power->1nW); a metric's unit type comes from the config's unit-types file - the remaining top-level keys: nested objects are categories, leaves (keys pointing to
string,booleanornumbervalues) are metrics
During serialization the values are converted to the config's target units: if unit_types targets area at
um^2 while a metrics file delivers area as mm^2, the values are multiplied by 10^6.
Example metrics file:
{
"floorplan": {
"power": {
"Sequential": {
"internal": 532.685469,
"total": 749.094045
}
}
},
"units": {
"power": "1nW"
}
}Paired with the unit-types map:
{
"floorplan.power.*": "power"
}This provides the internal and total metrics of floorplan > power > Sequential; via the unit-types map they
resolve to the power unit type and are interpreted as delivered in nW.
The metadata file describes the run that produced the metrics report. Depending on the event that triggered the run, different properties are required.
Fields for both triggers:
is_pr- trigger type:falsefor a push,truefor a pull requestcurrent_commit- SHA of the commit the run was performed atdate- date and time of the run,YYYY-MM-DD HH:MMsource_repository- name of the repository the run was performed onsource_branch- branch the run was performed on
Optional fields:
pipeline_status-passed,passed_with_warnings,failedorcanceled; displayed as unknown when omittedurl- link displayed on the overview card of the run's referenceconfiguration- variant of the design the run built, for branches or PRs triggering multiple flows; the dashboard groups the runs by itcommit_message- commit message, referenceable as@commit_messagein summary and overview fields
When is_pr is true, the metadata additionally contains:
pr_number- (required) PR number, displayed in the overviewpr_title- (required) PR title, displayed in the overviewtarget_repository- (required) repository the PR targetstarget_branch- (optional) branch the PR targets
Templates for the two metadata kinds (envsubst templates held under $TEMPLATE_PATH); unset optional variables
substitute to an empty string and are dropped by the generation step below:
Template example ($TEMPLATE_PATH/push.json.tpl):
{
"is_pr": false,
"current_commit": "${COMMIT}",
"configuration": "${CONFIGURATION}",
"commit_message": ${COMMIT_MESSAGE},
"source_branch": "${SRC_BRANCH}",
"source_repository": "${SRC_REPO}",
"date": "${DATE}",
"pipeline_status": "${STATUS}",
"url": "${URL}"
}Template example ($TEMPLATE_PATH/pr.json.tpl):
{
"is_pr": true,
"current_commit": "${COMMIT}",
"configuration": "${CONFIGURATION}",
"commit_message": ${COMMIT_MESSAGE},
"source_branch": "${SRC_BRANCH}",
"source_repository": "${SRC_REPO}",
"date": "${DATE}",
"pipeline_status": "${STATUS}",
"url": "${URL}",
"pr_number": ${PR_NUMBER},
"pr_title": ${PR_TITLE_JSON},
"target_branch": "${TGT_BRANCH}",
"target_repository": "${TGT_REPO}"
}Sample GitHub Actions steps producing the metadata files, assuming the metrics_* artifacts unpack to
metrics/metrics_*/*.json (jq and envsubst required):
- name: Download metrics
uses: actions/download-artifact@v4
with:
pattern: metrics_*
path: ./metrics
- name: Prepare runs
env:
TEMPLATE: ${{ github.event_name == 'pull_request' && 'pr' || 'push' }}
STATUS: ${{ inputs.pipeline_status }}
URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
SRC_BRANCH: ${{ github.head_ref || github.ref_name }}
SRC_REPO: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
TGT_BRANCH: ${{ github.base_ref }}
TGT_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
export DATE=$(date -u '+%Y-%m-%d %H:%M')
export COMMIT=$(git rev-parse --short=7 HEAD)
export COMMIT_MESSAGE=$(jq -n --arg t "$(git log -1 --format=%B)" '$t')
export PR_TITLE_JSON=$(jq -n --arg t "$PR_TITLE" '$t')
shopt -s nullglob
for dir in metrics/metrics_*/; do
for f in "$dir"*.json; do
case "$f" in
*/metadata.json|*.metadata.json) continue ;;
esac
# Unset optional fields substitute to ""; drop them instead
envsubst < "$TEMPLATE_PATH/$TEMPLATE.json.tpl" \
| jq 'with_entries(select(.value != "" and .value != null))' \
> "${f%.json}.metadata.json"
done
doneThe serialized data can then be built with the serializer (see Data preparation) over metrics/metrics_*/*_report.json.
The dashboard workflow takes the pipeline status as an input; the calling workflow supplies it from the job it
gates on (RUN in this example):
Metrics-Dashboard:
needs: RUN
uses: ./.github/workflows/metrics-dashboard.yml
with:
pipeline_status: >-
${{ needs.RUN.result == 'success' && 'passed'
|| needs.RUN.result == 'cancelled' && 'canceled'
|| 'failed' }}Before the dashboard is built, the runs are validated, normalized and serialized into the columnar data.json
(plus a config.json filtered to the keys the dashboard consumes) under metrics_dashboard/src/lib/data/.
To normalize and serialize metric files run the serialize_json.py script:
python tools/serialize_json.py -o metrics_dashboard/src/lib/data/ \
-i sample-data/*_report.json -c sample-data/config.jsonRuns are merged into any existing data.json, so the output directory accumulates them (re-adding the same run is
a no-op):
- new runs are skipped when their metrics file fails validation; metadata schema violations are reported but the run is still merged
- when a new run reports a different unit for an already stored metric, its values are converted to the stored unit; values that cannot be converted are dropped with a warning
--open-prs [PR ...]prunes the PR runs not on the list, along with the metrics only they provided; passing--open-prswith no arguments drops all PR runs--no-strictdrops malformed entries from the pre-existingdata.jsoninstead of failing on it
Optionally, a metrics file, its metadata and the configuration can be validated separately using the Python
validate_metrics.py script; the same validation always runs during serialization:
python tools/validate_metrics.py -c sample-data/config.json sample-data/counter_01_report.jsonThe dashboard expects serialized data data.json and config.json files in metrics_dashboard/src/lib/data. Refer to Data preparation section for serialization instructions.
cd metrics_dashboard
git submodule update --init # component library submodules (src/lib/aesir, src/lib/aesir-html)
npm i # install project npm dependencies
npm run build # invoke static page buildThe output is a single file written to build/index.html. Preview it with npm run preview or simply open it in
the browser of choice.
The app can be served by a development server that live-reloads the performed changes:
cd metrics_dashboard
npm i # install project npm dependencies
npm run dev # run the development serverThis will start the development server and log the URL where it can be accessed.
The dashboard uses TypeScript and external linters; run checks with:
npm run check # svelte-check (types)
npm run lint # prettier + eslint
npm test # vitest (unit tests)The Python tools have separate checks, with the dependencies from pip install ".[dev]" (see Prerequisites) run:
python -m pytest tools # unit tests
python -m black tools # formatting
python -m isort tools # import ordertools/- Python scripts that validate the configuration, metrics and metadata files and serialize them into thedata.jsonandconfig.jsonused by the dashboardserialize_json.py- serialization script, utilizes the other tools for validation and data normalizationvalidate_metrics.py- validates metrics, metadata and config files against the schemas as well as performs validation that cannot be performed by a schema - e.g. validating the units from the config against supplied metrics files, checking that the configured label / summary / overview fields exist in the actual metrics filesunits.pyandunit_sources.py- associating and normalizing units specified for the metric files; resolve each metric's unit type through the config's unit-types fileschemas/- JSON schemas for the metrics, metadata, configuration and unit-types filestests/- pytest suite for thetools
sample-data/- example data set used to generate and visualize the dashboardmetrics_dashboard/- Svelte dashboard project.npmrc,.prettierignore,.prettierrc,eslint.config.js,package.json,package-lock.json,svelte.config.js,tsconfig.json,vite.config.ts- configuration of the project and its tooling (Vite, TypeScript, ESLint, Prettier)index.html- the page everything's bound tosrc/- dashboard page sourcesapp.svelte- the main Svelte app (mounted bymain.ts)main.ts- entry point for the applib/- sources for the page views, data processing, plottingdata/- directory where the generateddata.jsonandconfig.jsonare expectedmetrics.ts- importing the serialized metrics & config, mapping and preparing structures for easier plotting and lookupsunits.ts- logic for handling the units (formatting, scaling)data.ts- metrics loader; handles missing data, builds the dataset for plottingaesir.ts- column alignment for the tables of the comparison and details views (used bymetric-tables.svelte)
lib/components/- Svelte componentscompare.svelte- comparison view, selects two runs and shows them side by side with the diff between themdetails.svelte- details dialog with the raw metrics of a run, opened by theView detailsbutton on the overview pagehistory.svelte- plots metrics over time for the main branch (config'smain_branch)metric-tables.svelte- tables for metrics used both in the comparison and details viewsoverview.svelte- view tracking open PRs & selected branches, grouped by design configuration; one card per group of runs, always showing the latest runrun-picker.svelte- dropdown wrapper for selecting the run displayed by the details and comparison viewssummary.svelte- box with user-configured pinned information for the history and comparison views