Files
hyperfine/src/benchmark/measurement.rs
T

22 lines
540 B
Rust
Raw Normal View History

use std::process::ExitStatus;
2022-02-20 13:44:34 +01:00
use crate::util::units::Second;
/// Performance measurements and exit status from running a single command
2022-02-20 13:44:34 +01:00
#[derive(Debug, Default, Copy, Clone)]
pub struct Measurement {
2022-02-20 13:44:34 +01:00
/// Wall clock time
2026-10-05 10:09:41 +02:00
pub time_wall_clock: Second,
2022-02-20 13:44:34 +01:00
/// Time spent in user mode
pub time_user: Second,
/// Time spent in kernel mode
pub time_system: Second,
2024-06-23 13:29:05 +02:00
/// Maximum amount of memory used, in bytes
2026-10-05 10:09:41 +02:00
pub peak_memory_usage: u64,
/// The exit status of the process
2026-10-05 10:09:41 +02:00
pub exit_status: ExitStatus,
2022-02-20 13:44:34 +01:00
}