Contents

Metric

A named metric that carries a result value.

Declaration

struct Metric

Mentioned in

Overview

Use Metric to define a named measurement. The factory methods (passing, failing, scoring, ignore) return a new Metric with the result stored inside.

Here’s how you create a custom metric:

let metric = Metric("Accuracy")
let result = metric.passing(rationale: "Exact match")

Topics

Creating a metric

Producing results

Inspecting a result

See Also

Metrics and evaluators