mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 17:00:18 +00:00
Initial work on tracking memory usage
This commit is contained in:
1 parent
f78f482d8f
commit
6556b2bd46
13 files changed
+68
-7
No files matched your search
@@ -86,7 +86,7 @@ impl CPUTimer {
|
||||
Self { job_object }
|
||||
}
|
||||
|
||||
pub fn stop(&self) -> (Second, Second) {
|
||||
pub fn stop(&self) -> (Second, Second, u64) {
|
||||
let mut job_object_info =
|
||||
mem::MaybeUninit::<JOBOBJECT_BASIC_ACCOUNTING_INFORMATION>::uninit();
|
||||
|
||||
@@ -114,9 +114,9 @@ impl CPUTimer {
|
||||
// for all active processes associated with the job, as well as all terminated
|
||||
// processes no longer associated with the job, in 100-nanosecond ticks."
|
||||
let kernel: i64 = job_object_info.TotalKernelTime / HUNDRED_NS_PER_MS;
|
||||
(user as f64 * 1e-6, kernel as f64 * 1e-6)
|
||||
(user as f64 * 1e-6, kernel as f64 * 1e-6, 0)
|
||||
} else {
|
||||
(0.0, 0.0)
|
||||
(0.0, 0.0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user