Metrics files

A metric is one value Odatix extracts from what a run produced, and one column you can chart in Explorer. Three kinds of files declare them.

Which file declares what

File Declares Applies to
tools/<tool>/metrics.yml What to extract from an eda tool’s reports. Every synthesis, analysis and place & route run of that tool.
simulations/<sim>/_metrics.yml What to extract from a testbench run. That simulation.
workflows/<name>/_metrics.yml What to extract from a workflow’s outputs. That workflow.
odatix_userconfig/derived_metrics.yml Metrics computed from other metrics, possibly across result kinds. The workspace.

A tool’s metrics file is named by default_metrics_file in its tool.yml, or per flow by flows.<name>.metrics_file. The workspace derived metrics file is named by derived_metrics_file in odatix.yml.

Sections of a tool’s metrics.yml

Section Applies to
metrics Every synthesis run of the tool (area, resources, power…).
fmax_synthesis_metrics odatix fmax runs only.
custom_freq_synthesis_metrics odatix synth runs only.

Simulation and workflow files use a single metrics section, plus an optional metadata section.

Schema of a metric entry

Key Required Description
type Yes Extraction method: regex, csv, yaml, json, xml, benchmark or operation.
settings Yes Type-specific settings, below.
format No Numeric formatting string, e.g. "%.2f".
unit No Unit label exported with the value, e.g. MHz.
error_if_missing No Default true. Set to false when a value may legitimately be absent.
step No Synthesis only. Name of the flow step the metric belongs to. The metric then appears in the record of that step alone. Left out, the metric is extracted for every step of the job.
$step in settings.file — Not a key: results are exported once per step, and $step resolves to the step of the record being written. A metric reading report/$step/utilization.rep is therefore measured again at each step, from that step’s own reports; a step that wrote no such file simply has no value for it, which is not an error.
benchmark_only No Synthesis only. Extract only when benchmark export is enabled.
multiple No Workflows and simulations only. Default false; true extracts every match and expands the run into one record per row. Supported by regex, csv and xml.

Type-specific settings

type Keys
regex file, pattern, group_id
csv file, key (column header)
yaml file, optional key
json file, optional key
xml file, optional key (ElementTree path, optional trailing @attribute)
benchmark key
operation op — an expression over metrics extracted earlier in the same file
workflows/<name>/_metrics.yml
metrics:
  letters:
    type: regex
    settings:
      file: output.txt
      pattern: "letters: ([0-9]+)"
      group_id: 1
    format: "%.0f"

  best_val_accuracy:
    type: json
    settings:
      file: workflow_results.json
      key: best_val_accuracy
    format: "%.6f"

Every type, with worked examples and the multiple/metadata mechanism, is documented on Base metrics.

derived_metrics.yml

Derived metrics compute a value from metrics a result already has, or import one from a different kind of result — the canonical case being a simulation’s cycle count meeting a synthesis’s Fmax to produce a runtime.

Section Content
groups Named sets of designs, reusable in a metric’s for key as "@group".
derived_metrics The metric definitions themselves.

The two kinds are import (read a metric from a matching result of another kind, keyed by from) and operation (evaluate an op expression). Every key — apply_to, for, where, source_where, on_multiple, match and the dimension-joining rules — is documented on Derived metrics.

In the GUI

The Metrics editors build these entries in a form — extraction type, file, pattern — for a tool, a workflow or a simulation. Derived Metrics (/derived_metrics) edits derived_metrics.yml. See The Odatix GUI.

See also