https://github.com/nnethercote/dhat-rs
Heap profiling and ad hoc profiling for Rust programs.
https://github.com/nnethercote/dhat-rs
Last synced: about 1 year ago
JSON representation
Heap profiling and ad hoc profiling for Rust programs.
- Host: GitHub
- URL: https://github.com/nnethercote/dhat-rs
- Owner: nnethercote
- License: apache-2.0
- Created: 2020-12-07T01:09:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-02-20T20:03:09.000Z (over 1 year ago)
- Last Synced: 2025-04-28T17:09:21.405Z (about 1 year ago)
- Language: Rust
- Size: 122 KB
- Stars: 788
- Watchers: 10
- Forks: 40
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- Awesome-Rust-Checker - dhat-rs - | Memory leaks, Heap allocation patterns | Instrumentation | 2025-02-20 | (Dynamic Checkers)
README
# 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].
[DHAT]: https://www.valgrind.org/docs/manual/dh-manual.html
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.
[crate documentation]: https://docs.rs/dhat
## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT)
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.