pub struct Flamegrapher { /* private fields */ }
Expand description

Helper struct that uses inferno internally to programatically produce a flamegraph from a folded stack trace file.

Implementations

Creates a new Flamegrapher with no associated files.

Returns a Flamegrapher with the given folded stack file name.

Errors

This method may fail in the following ways:

  • The given stack file does not exist.

Returns a Flamegrapher with the given flamegraph file name.

This file will be given the extension of .svg.

Errors

This method may fail in the following ways:

  • The given graph filename is invalid (it does not belong to a directory that exists).

Uses inferno to generate a flamegraph from the given folded stack file, and writes it to the given output image file.

Errors

This method may fail in the following ways:

  • This Flamegrapher does not have a stack or graph file associated with it.
  • An error was encountered when opening the folded stack file for reading.
  • An error was encountered when creating the graph file.

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more