13 releases

0.3.3 Feb 4, 2024
0.3.2 Oct 31, 2022
0.3.1 Sep 26, 2022
0.3.0 Jan 16, 2022
0.2.1 Dec 13, 2020

#13 in Profiling

Download history 4882/week @ 2023-12-23 8665/week @ 2023-12-30 11888/week @ 2024-01-06 12138/week @ 2024-01-13 16732/week @ 2024-01-20 15180/week @ 2024-01-27 13518/week @ 2024-02-03 14960/week @ 2024-02-10 16784/week @ 2024-02-17 16099/week @ 2024-02-24 15651/week @ 2024-03-02 16419/week @ 2024-03-09 16631/week @ 2024-03-16 15241/week @ 2024-03-23 14483/week @ 2024-03-30 12391/week @ 2024-04-06

61,767 downloads per month
Used in 43 crates (40 directly)

MIT/Apache

79KB
1K SLoC

dhat-rs

Warning: This crate is experimental. It relies on implementation techniques that are hard to keep working for 100% of configurations. It may work fine for you, or it may crash, hang, or otherwise do the wrong thing. Its maintenance is not a high priority of the author. Support requests such as issues and pull requests may receive slow responses, or no response at all. Sorry!

This crate provides heap profiling and ad hoc profiling capabilities to Rust programs, similar to those provided by DHAT.

It also provides heap usage testing capabilities, which let you write tests that check things like:

  • "This code should do exactly 96 heap allocations".
  • "The peak heap usage of this code should be less than 10 MiB".
  • "This code should free all heap allocations before finishing".

It provides helpful details if these fail.

See the crate documentation for details on how to use it.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~4–12MB
~115K SLoC