metric_display_name

Function metric_display_name 

Source
pub fn metric_display_name(metric: &CtprofMetricDef) -> &'static str
Expand description

Borrow the metric’s bare name from the registry. The &'static str lifetime piggybacks on CtprofMetricDef::name’s static-string storage — callers may borrow the static name without allocation; render sites that need owned Strings allocate at the table-cell boundary (see super::render at the metric_display_name(metric_def).to_string() call site and super::runner::write_metric_list).

Companion to metric_tags, which renders the bracketed [<class>] [<tag>] ... suffix separately. Render sites concatenate the two into the final display column.