dhat-to-flamegraph

Crates.iodhat-to-flamegraph
lib.rsdhat-to-flamegraph
version2.1.0
created_at2024-12-19 22:15:21.177946+00
updated_at2024-12-20 17:38:18.476611+00
descriptionConvert dhat JSON output to a flamegraph
homepage
repositoryhttps://github.com/yoshuawuyts/dhat-to-flamegraph
max_upload_size
id1489636
size57,837
Yosh (yoshuawuyts)

documentation

https://docs.rs/dhat-to-flamegraph

README

dhat-to-flamegraph

Convert dhat JSON output to a flamegraph

Crates.io version Download docs.rs docs

API Docs | Releases | Contributing

Installation

$ cargo install dhat-to-flamegraph

Usage

Convert dhat JSON output to a flamegraph

Usage: dhat-to-flamegraph [OPTIONS] <INPUT>

Arguments:
  <INPUT>
          The dhat JSON file to process

Options:
  -o, --output <OUTPUT>
          Where to place the output
          
          If not provided then stdout is used.

  -f, --format <FORMAT>
          Which output format to use

          Possible values:
          - svg:    Format as svg (default)
          - folded: Format as folded stack traces

  -m, --metric <METRIC>
          Possible values:
          - total:    Measure all traces, output total memory usage per trace (default)
          - max:      Measure all traces, output max memory usage per trace
          - end:      Measure only the remaining traces at program end, useful to find leaks
          - heap-max: Measure only the traces at max heap usage, useful to find spikes

  -u, --unit <UNIT>
          Possible values:
          - bytes:     Measure allocations in bytes (default)
          - blocks:    Measure allocations in blocks, useful to find allocation counts
          - lifetimes: Measure allocations in lifetimes, useful to find short-lived allocations

  -h, --help
          Print help (see a summary with '-h')

Usage example:

dhat-to-flamegraph fixtures/dhat-heap.json > out.svg
open out.svg

See Also

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 15

cargo fmt