[go: up one dir, main page]

firestorm 0.4.0

A low overhead intrusive flamegraph profiler.
Documentation
pub mod internal {
    pub struct SpanGuard;
}

#[macro_export]
macro_rules! profile_fn {
    ($($t:tt)*) => {};
}

#[macro_export]
macro_rules! profile_method {
    ($($t:tt)*) => {};
}

#[macro_export]
macro_rules! profile_section {
    ($name:ident) => {
        #[allow(unused_variables)]
        let $name = $crate::internal::SpanGuard;
    };
}

#[inline(always)]
pub fn clear() {}

#[inline(always)]
pub fn to_svg<W: std::io::Write>(_writer: &mut W) -> Result<(), std::convert::Infallible> {
    Ok(())
}

/// Returns whether or not firestorm is enabled
#[inline(always)]
pub const fn enabled() -> bool {
    false
}