Device Detection and IP Intelligence for the 51Degrees Pipeline, in Rust

PerformanceResults Struct Reference

Detailed Description

A set of performance metrics in the shared results schema.

Metric names are the series keys on the graph, so they must stay stable across runs of the same configuration. Metrics are held in a [BTreeMap] so the serialised order is deterministic whatever order they were added in.

Examples

use examples_shared::PerformanceResults;
let results = PerformanceResults::new()
.higher_is_better("DetectionsPerSecond", 1_234_567.0)
.lower_is_better("AvgMillisecsPerDetection", 0.00081);
assert!(results.to_json().contains("\"DetectionsPerSecond\""));

Public Attributes

higher_is_better : BTreeMap<String
 Metrics where a higher value is a better result, such as a throughput.
higher_is_better f64
higher_is_better lower_is_better: BTreeMap<String
 Metrics where a lower value is a better result, such as a per-item cost.

Member Data Documentation

◆ __pad0__

higher_is_better PerformanceResults::__pad0__

Metrics where a higher value is a better result, such as a throughput.

◆ f64

higher_is_better PerformanceResults::f64

◆ lower_is_better

higher_is_better PerformanceResults::lower_is_better

Metrics where a lower value is a better result, such as a per-item cost.