/// Collects a CPU profile as SVG flamegraph for the given `duration` by
/// sampling at the given `frequency`.
Collects a CPU profile as SVG flamegraph for the given `duration` by
sampling at the given `frequency`.
Collects a CPU profile as SVG flamegraph for the given ` duration ` by sampling at the given ` frequency ` .
pub async fn flamegraph(duration: Duration, frequency: i32) -> Result<Vec<u8>, Error> {
    let mut body: Vec<u8> = Vec::new();
    collect(duration, frequency).await?.flamegraph(&mut body)?;
    Ok(body)
}
pub async fn flamegraph ( duration : Duration , frequency : i32 ) -> Result < Vec < u8 > , Error > { let mut body : Vec < u8 > = Vec :: new ( ) ; collect ( duration , frequency ) . await ? . flamegraph ( & mut body ) ? ; Ok ( body ) }
Collects a CPU profile as SVG flamegraph for the given `duration` by
sampling at the given `frequency`.
Collects a CPU profile as SVG flamegraph for the given ` duration ` by sampling at the given ` frequency ` .
duration
Duration
frequency
i32