kperf-rs

Crates.iokperf-rs
lib.rskperf-rs
version0.1.1
sourcesrc
created_at2024-01-05 18:00:45.826891
updated_at2024-01-11 22:56:14.169904
descriptionRust safe wrapper over kperf-sys library
homepage
repositoryhttps://github.com/El-Naizin/rust-kperf/tree/main
max_upload_size
id1089980
size20,228
(El-Naizin)

documentation

README

rust-kperf

Native rust bindings to the private macOS frameworks: kperf and kperfdata. The library binds to the frameworks with the libc library. This framework allows access to the PMU, and it's usage requires the process to be run with super-user privileges.

If when building or running this code on a Mac, you have a linker error, it means either the kperf or kperfdata private frameworks changed, or some functions were not well tested.

I could only test the code on an Apple M2 2022 macbook air, on macOS Ventura 13.5.2

Issues are welcome.

Still a WIP.

Credit

The rust code was written from the reverse-engineering efforts of two posts I saw online:

Commit count: 0

cargo fmt