2026-10-05 09:47:09 +02:00
|
|
|
use std::process::ExitStatus;
|
|
|
|
|
|
2022-02-20 13:44:34 +01:00
|
|
|
use crate::util::units::Second;
|
|
|
|
|
|
2026-10-05 09:47:09 +02:00
|
|
|
/// Performance measurements and exit status from running a single command
|
2022-02-20 13:44:34 +01:00
|
|
|
#[derive(Debug, Default, Copy, Clone)]
|
2026-10-05 09:47:09 +02:00
|
|
|
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,
|
2026-10-05 09:47:09 +02:00
|
|
|
|
|
|
|
|
/// 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
|
|
|
}
|