Trait inferno::collapse::Collapse [−][src]
The abstract behavior of stack collapsing.
Implementors of this trait are providing a way to take the stack traces produced by a
particular profiler’s output (like perf script
) and produce lines in the folded stack format
expected by [crate::flamegraph::from_sorted_lines
].
See also the crate-level documentation for details.
Required methods
fn collapse<R, W>(&mut self, reader: R, writer: W) -> Result<()> where
R: BufRead,
W: Write,
[src]
R: BufRead,
W: Write,
Collapses the contents of the provided reader
and writes folded stack lines to the
provided writer
.
fn is_applicable(&mut self, input: &str) -> Option<bool>
[src]
Returns whether this implementation is appropriate for the given input.
None
means “not sure – need more input”Some(true)
means “yes, this implementation should work with this string”Some(false)
means “no, this implementation definitely won’t work”
Provided methods
fn collapse_file<P, W>(&mut self, infile: Option<P>, writer: W) -> Result<()> where
P: AsRef<Path>,
W: Write,
[src]
P: AsRef<Path>,
W: Write,
Collapses the contents of the provided file (or of STDIN if infile
is None
) and
writes folded stack lines to provided writer
.
Implementors
impl Collapse for inferno::collapse::guess::Folder
[src]
fn collapse<R, W>(&mut self, reader: R, writer: W) -> Result<()> where
R: BufRead,
W: Write,
[src]
R: BufRead,
W: Write,
fn is_applicable(&mut self, _line: &str) -> Option<bool>
[src]
impl Collapse for inferno::collapse::sample::Folder
[src]
fn collapse<R, W>(&mut self, reader: R, writer: W) -> Result<()> where
R: BufRead,
W: Write,
[src]
R: BufRead,
W: Write,
fn is_applicable(&mut self, input: &str) -> Option<bool>
[src]
Check for start and end lines of a call graph.
impl Collapse for inferno::collapse::vtune::Folder
[src]
fn collapse<R, W>(&mut self, reader: R, writer: W) -> Result<()> where
R: BufRead,
W: Write,
[src]
R: BufRead,
W: Write,
fn is_applicable(&mut self, input: &str) -> Option<bool>
[src]
Check for header
impl<T> Collapse for T where
T: CollapsePrivate,
[src]
T: CollapsePrivate,