Crates.io | macos-perf |
lib.rs | macos-perf |
version | 0.1.1 |
source | src |
created_at | 2022-01-09 05:17:05.80473 |
updated_at | 2022-01-09 05:34:51.780621 |
description | Measure the performance of Rust code on Apple's M1 series chips using performance counters. |
homepage | |
repository | https://github.com/siedentop/macos-perf |
max_upload_size | |
id | 510668 |
size | 39,805 |
Measure the performance of Rust code on Apple's M1 series chips using performance counters. The resulting measurements will be much more stable than simply timing the execution. However, we still need to model the expected execution time based off the reported metrics.
// See also examples/main.rs
use rust_macos_perf::{init, timeit_loops};
init().unwrap();
let pc = timeit_loops! {10, {
// Your function here.
}}
.unwrap();
println!("{:?}", pc);
This is an extremely unstable API. Also the the underlying Apple functions may change anytime.
xcode-select --install
. If anything else is missing, please file a ticket here on GitHub.sudo
.Please run tests both as sudo and without sudo.