#profiling

dhat

A library for heap profiling and ad hoc profiling with DHAT

12 releases

0.3.2 Oct 31, 2022
0.3.1 Sep 26, 2022
0.3.0 Jan 16, 2022
0.3.0-pre.1 Dec 13, 2021
0.1.1 Dec 8, 2020

#8 in Profiling

Download history 9884/week @ 2023-02-14 12984/week @ 2023-02-21 9428/week @ 2023-02-28 11882/week @ 2023-03-07 11489/week @ 2023-03-14 12774/week @ 2023-03-21 11924/week @ 2023-03-28 13062/week @ 2023-04-04 15070/week @ 2023-04-11 13064/week @ 2023-04-18 10545/week @ 2023-04-25 10787/week @ 2023-05-02 9573/week @ 2023-05-09 11096/week @ 2023-05-16 10017/week @ 2023-05-23 11729/week @ 2023-05-30

44,175 downloads per month
Used in 23 crates (19 directly)

MIT/Apache

185KB
1K SLoC

dhat-rs

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

~5–6.5MB
~130K SLoC