Skip to content
Myr

Update BenchmarkResult documentation

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 021583b · Browse files · 1 file+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−8 removed

  • other:+8 added−8 removed

1 file+8 added−8 removed

modified:src/benchmark/benchmark_result.rs+8 added-8 removed
7 unmodified lines
8// NOTE: `serde` is used for JSON serialization, but not for CSV serialization due to the9// `parameters` map. Update `src/hyperfine/export/csv.rs` with new fields, as appropriate.10#[derive(Debug, Default, Clone, Serialize, PartialEq)]11pub struct BenchmarkResult {12 /// The command that was run12 /// The full command line of the program that is being benchmarked13 pub command: String,1415 /// The mean run time15 /// The average run time16 pub mean: Second,1718 /// The standard deviation of all run times. Not available if only one run has been performed19 pub stddev: Option<Second>,2021 /// The median run time22 pub median: Second,2324 /// Time spend in user space24 /// Time spent in user mode25 pub user: Second,2627 /// Time spent in system space27 /// Time spent in kernel mode28 pub system: Second,2930 /// Min time measured30 /// Minimum of all measured times31 pub min: Second,3233 /// Max time measured33 /// Maximum of all measured times34 pub max: Second,3536 /// All run time measurements37 #[serde(skip_serializing_if = "Option::is_none")]38 pub times: Option<Vec<Second>>,3940 /// All run exit codes40 /// Exit codes of all command invocations41 pub exit_codes: Vec<Option<i32>>,4243 /// Any parameter values used43 /// Parameter values for this benchmark44 #[serde(skip_serializing_if = "BTreeMap::is_empty")]45 pub parameters: BTreeMap<String, String>,46}