A cross-platform Rust library for retrieving CPU, memory, IO, and file descriptor performance statistics with minimal overhead.
perf-monitor-rs is a Rust toolkit that provides a cross-platform foundation for applications to monitor their own performance metrics. It offers safe, efficient APIs for gathering detailed system statistics like CPU, memory, IO, and file descriptor usage, helping developers identify and diagnose performance issues in real-time with minimal overhead.
Rust developers building cross-platform applications (desktop, mobile, or server) that require embedded, low-overhead performance monitoring for self-diagnosis and optimization.
Developers choose perf-monitor-rs for its combination of safe Rust APIs, cross-platform support (Windows, macOS, Linux, iOS, Android), and minimal profiling overhead as a thin wrapper around system interfaces. It uniquely provides thread-level CPU monitoring and FD tracking where alternatives like sysinfo lack features or require explicit refreshes.
A cross-platform library to retrieve performance statistics data.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Windows, macOS, Linux, iOS, and Android for core metrics like CPU and memory, as detailed in the platform compatibility table in the README.
Provides CPU usage for individual threads within the current process, which is crucial for diagnosing multi-threaded performance issues, as demonstrated in the example code.
Benchmarks in the README show low cost, e.g., thread CPU usage measured in milliseconds, ensuring it doesn't significantly impact application performance.
Wraps system C interfaces in safe Rust APIs, reducing the risk of memory safety issues, as emphasized in the project's philosophy.
The README lists several features as 'coming soon,' including other process monitoring, network IO, and full Linux memory info, limiting its current utility for comprehensive monitoring.
FD count is not supported on iOS, and memory info is incomplete for Linux, which can be a drawback for truly cross-platform applications targeting all listed OSes.
Building documentation requires the nightly Rust toolchain, as noted in the README, adding setup overhead and potential friction for users on stable Rust.