mirror of
https://github.com/servo/servo.git
synced 2025-06-17 21:04:28 +00:00
Integrate with simple Heartbeats This PR adds Heartbeats capability to servo. Heartbeats are used for detailed performance and power/energy profiling. We will add the power/energy readings in the future. New dependencies are introduced which need in-depth reviews. I'm the only one who has had eyes on any of this, and I have limited resources for testing cross-platform compatibility. * https://github.com/libheartbeats/heartbeats-simple - provides native C libraries from a shared code base: * hbs[-static] - performance monitoring * hbs-acc[-static] - performance with accuracy monitoring * hbs-pow[-static] - performance with power/energy monitoring (the one we're using) * hbs-acc-pow[-static] - performance with accuracy and power/energy monitoring * https://github.com/connorimes/heartbeats-simple-sys provides rust wrappers for the native C libraries above - one crate for each + a common crate. These link with the *-static versions of the heartbeats libraries. * https://github.com/connorimes/heartbeats-simple-rust provides rust abstractions over the -sys crates above - one crate for each. The new `heartbeats` module in the `profile` crate looks for environment variables telling it to use heartbeats for each ProfilerCategory and where to put log files. (Of course, if somebody knows how to iterate over the enum instead of hardcoding each one, that would be fantastic.) If the environment variables aren't set for particular categories, heartbeats aren't created or used. An interface change is made in the `profile_traits` crate to pass both the start and end time in a `ProfilerMsg` instead of just the elapsed time. Later we will add energy readings as well. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7179) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
Cargo.toml | ||
lib.rs | ||
mem.rs | ||
time.rs |