Results and reports
Every job writes a result file, result.json, when it ends. The result is the record of the job. Reports are HTML pages made from result files, and from nothing else.
The result file
scratch/doris/<flow>/<job>/result.json is versioned JSON. Its schema names the flow and the format version: dv/testrig-result/1 or dv/lint-result/1. Fields with no value are left out, not written as null. A path in it is relative to the job’s directory, such as a lint message’s file. The exception is a TestRIG counterexample’s file, which is absolute.
Every flow’s result has these fields:
| Field | Meaning |
|---|---|
schema | The result format and its version |
job, dut | The job ID and the design |
tool | The tool in each of the flow’s roles, by name |
versions | The version of each tool the job’s steps use, by the tool’s name |
produced_by | The doris release version, such as doris 0.1.0 |
revision | The repo’s commit, with (dirty) if tracked files have changes. Untracked files don’t count |
timestamp | When the result was written, at the end of the job |
until | Present if the job was cut short with --until. The result then covers only the steps up to that one |
tags | The job’s tags: its design file’s, then its flow config’s. Left out if it has none (see Filters) |
outcome | The worst step outcome, with message if it is not a pass |
steps | Per step: outcome, message, seconds, the cache key if it has one, cached, metrics, and a cache unit’s children |
The metadata follows the lowrisc-dv-evidence format, so other tools that read that format see the same fields. revision is left out if git can’t give it.
versions is a map from a tool’s name to its version. It has an entry for every tool a step of the job declares: the tools bound to the flow’s roles, such as xcelium or slang, and helper programs, such as fusesoc and gcc.
- A version is what the tool’s probe reports, the same text that is part of the step’s cache key. It is whatever the tool’s version command prints, so it can be more than a number.
- A tool whose probe fails is left out.
versionsis left out when it would be empty. - The versions are read when the result is written, from the machine the job ran on. For a step that came from the cache, the version is the one that would have run, which is the one in the step’s key.
- Steps a plugin runs itself have no entry, such as
flatten, and thecoveragestep of a Verilator job. - The reports don’t show versions yet. Read them from
result.json.
cached: true means the step did not run in this job (see Seeing what was cached).
steps has one entry for each step of the job, in the order planned. A cache unit is one entry, with a children list of how each of its children ended, in the order they ended: name, outcome, message, seconds, and resumed: true for one that was done in an earlier, interrupted run and not run again. A unit taken from the cache has no children, since none ran. The child of a unit in a unit is named INNER/NAME. A composite step’s children are steps of the job, each an entry of its own, named PARENT/CHILD. No flow has either yet.
metrics is what the scheduler measured of the step (see Metrics). A skipped step has none. Times are in seconds.
| Field | Meaning |
|---|---|
started | When the step started, from the start of the run. For a step that waited for a pool, when it got it |
ended | When it ended, from the start of the run |
waited | How long it was ready but held back |
key_seconds | How long it took to work out its cache key and look for it in the cache, before started. Part of seconds: for a cached step, nearly all of it |
cpu_seconds | CPU time of its processes: its cgroup’s, if it was measured in one. Left out for a cached step and for one a plugin runs itself |
max_rss_bytes | The most memory any one of its processes had resident. Left out with cpu_seconds |
memory_peak_bytes | The most memory the step had at once, all its processes together. Only for a step measured in a cgroup, as are the next three |
parallelism | How many CPUs it kept busy on average |
parallelism_p95 | How many CPUs it kept busy in its busiest seconds |
disk_peak_bytes | The most its working directory took on disk |
resources | What it held from each resource pool: memory and disk in bytes. Left out if it held nothing, as a cached step did |
tool | The tool its command runs, if it runs one |
parts | For a step with services, each part: its command, then each service, measured each in a cgroup of its own. See below |
seconds is the time the step itself took, key_seconds included and waited not.
Each of parts has service, left out for the command, tool, resources, what the part held, and cpu_seconds, memory_peak_bytes, parallelism and parallelism_p95 of the part alone. killed_for_memory: true marks a part the kernel killed a process of. The step’s own fields are of all its parts together.
The metrics file
doris run also writes scratch/doris/<flow>/metrics.json, with what the scheduler measured of the whole run. Its schema is doris/run-metrics/1. Each run of a flow replaces it. A copy is kept with the run’s GC root, as each job’s result is, so a past run’s metrics can still be reported on.
| Field | Meaning |
|---|---|
produced_by, timestamp | As in a result file |
command | The command line of the run |
wall_seconds | How long the steps of the run took, from the first starting to the last ending |
max_steps, peak_steps | -j, and the most steps that ran at once |
waited_seconds | How long steps were held back by -j, added over the steps |
step_seconds, cpu_seconds | The time and the CPU time of the steps that ran, added together |
pools | A list, one per pool a step held some of: name, size if it is limited, peak, steps and waited_seconds. memory and disk are in bytes |
jobs | Per job: id, outcome, and steps as in its result file |
# The steps that waited longest, and for how long.
jq -r '.jobs[] | .id as $j | .steps[] | select(.metrics) | "\(.metrics.waited)\t\($j): \(.name)"' metrics.json | sort -rn | head
TestRIG
| Field | Meaning |
|---|---|
mode | generate or replay |
tests_requested | Generate mode: --tests if given, otherwise tests.count. A request, not a count of tests that ran |
seed | Generate mode: the seed the tests were generated from. --seed with it repeats the run |
tests | Per test group, or per trace in replay mode: outcome, tests passed and tests run |
counterexamples | Each saved counterexample: where it was kept and its trace |
coverage | Per module with covergroups: covergroup average in percent, and bins covered out of total |
instructions | Per instruction QCVEngine saw: times executed without a trap (notrap) and with one (trap) |
The test counts are read from QCVEngine’s output. instructions is read from the statistics file QCVEngine writes, run/stats.txt, and is there only when the run step completed. See TestRIG for what they cover. coverage is there only when the coverage step passed, and tool.coverage names the reporter whenever the job has that step. That step runs after a run step that failed too, so a job with a failing test still has its coverage.
Lint
| Field | Meaning |
|---|---|
context | The top whose context a shared design was linted in. Left out for a design run on its own |
linted | Whether the lint step completed. If not, the counts and messages say nothing |
errors, warnings | How many messages of each severity the linter reported |
messages | Each message: severity, rule, file, line, column and text. Waived ones are not in it |
See Lint for the details of a message.
Reports
A report has a header with the outcome, revision, tools and seed, a table of tests with passing, total and pass rate, the failures, and the steps. A lint page has the message counts by rule and the messages in place of the tests. Each page is one self-contained file, with no scripts. The metrics page is the exception: it is drawn by a script, and loads its charting library from the assets directory beside it, never from a network.
| Command | Does |
|---|---|
doris run FLOW [DESIGN...] | Writes the pages of the jobs it ran and the flow’s index, when the jobs end |
doris report FLOW [DESIGN...] | Writes the same pages again, from the result.json files in the scratch directory |
doris report view [RUN] | Serves the reports from a web server in doris, and opens the browser at one of them |
The pages doris run and doris report FLOW write are files, next to the results they are made from:
scratch/doris/<flow>/
report.html the flow's index: one row per job, its latest result
metrics.html the metrics page of the flow's latest run
assets/ what the metrics page loads: the charting library
<job>/report.html the job's page
A report shows only what its result file holds. It is not made from logs or from the steps’ directories. For what a result does not cover, see each flow’s page. A result file whose schema this doris does not know is left out.
Pages are never the record of a run. The result is the record, and a page is made from it when it is written or asked for, by the doris that is asked, with that doris’s layout. So the report of an old run can be made again after doris has changed, and it then has the new layout. The footer names the doris that made the page and the one that wrote the result.
Viewing reports
doris report view # open the index of flows and runs
doris report view latest # open the latest run, of any repo
doris report view signoff # open a pinned run
doris report view --no-open --port 8000 # only serve, on a fixed port
doris report view writes nothing. It listens on 127.0.0.1, on any free port or the one given with --port, prints the address, opens the browser there, and runs until it is interrupted. --no-open only prints the address, for a machine with no browser: forward the port to one that has.
It needs no project. The runs are in the cache, which is per user, so it serves them from anywhere. In a checkout, the home page has the checkout’s latest results and lists its runs. It does not load the checkout’s configs, so one that does not load does not stop it. Outside a checkout, the home page lists the runs of every repo in the cache, with a column for each run’s repo, and there are no /flows/ pages.
The home page has a row per run, newest first. A run is shown by its number, counted from the oldest run listed, with its ID on hover; the numbers move down when doris gc drops older runs. A pinned run has a pin before its number. Each row counts the run’s jobs, the pass rate, and the jobs that failed, had an error, or were skipped, with each outcome’s count on hover.
It serves:
| Address | Page |
|---|---|
/ | The flows with results in the scratch directory, and this repo’s runs |
/?flow=<flow> | The same, for one flow: its latest results, and the runs with a job of that flow, counting only those jobs |
/flows/<flow>/report.html | The flow’s index of latest results |
/flows/<flow>/metrics.html | The metrics page of the flow’s latest run |
/flows/<flow>/<job>/report.html | A job’s latest result |
/flows/... | Any other file or directory in the scratch directory, such as a log |
/runs/<run>/report.html | One past run: a row per job of that run |
/runs/<run>/metrics.html | The metrics page of that run |
/runs/<run>/<job>/report.html | A job as it was in that run |
/runs/<run>/<job>/files/<step>/<output>/... | A step output of that run, as the cache keeps it |
Under /runs/, <job> is the whole job ID, flow included, with each character other than a letter, digit, -, _, . or @ written _: lint_top_chip_system_uart@verilator. Under /flows/, it is the job’s directory, as in Jobs, steps and directories.
Past runs. A run is a GC root. doris run keeps each job’s result in the run’s root, so the report of a past run can be made for as long as the root lives, whatever later runs do to the scratch directory. RUN names a root as doris gc roots lists it: its ID, a unique prefix of it, a pin name, or latest. latest is the newest run in the cache, of any repo, even in a checkout. Pin a run whose report must stay available.
Text files. A log or any other text file is shown in a viewer, not sent as it is. Each line has a number, and the number links to the line: .../stdout.log#L120 opens the file at line 120 and marks it. The viewer makes visible what a browser would not show. A control character is shown as its control picture, such as ␁, and a byte that is not UTF-8 as \xNN. A tool’s terminal colours are drawn as a terminal would draw them, and other terminal escape sequences are left out. The viewer shows the first 8 MiB of a file. Add ?raw to the address, or follow the viewer’s link, for the file itself.
Coverage data. A Verilator coverage data file, as the run step of a Verilator job keeps, is shown as a table with a row for each coverage point: its hits, its place in the source, and the other fields of the point, with Verilator’s __0XX encoding of names undone. A point with no hits has its count in red. A row has the number of its line in the file, so #L120 links to it as in any other file. This is the data as Verilator wrote it; the job’s coverage report is the place to read functional coverage.
Logs. The job page in the scratch directory links each step to the *.log files that are in its directory when the page is made. A step that passed has only the logs it declares as outputs, so most passed steps have no link; a step that failed or did not complete has them all, and so has every step after a run with --debug (see Working directories). The logs are those of the run that last ran the step. The page of a past run links instead to the step outputs the cache keeps, for the steps that have a cache entry.