hotpath-macros 0.15.0

Simple async Rust profiler with memory and data-flow insights - quickly find and debug performance bottlenecks. Proc macros crate.
use proc_macro::TokenStream;

/// No-op version of `#[hotpath::main]` when profiling is disabled.
///
/// This macro simply returns the original function unchanged.
pub fn main_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}

/// No-op version of `#[hotpath::measure]` when profiling is disabled.
///
/// This macro simply returns the original function unchanged.
pub fn measure_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}

/// No-op version of `#[hotpath::future_fn]` when profiling is disabled.
///
/// This macro simply returns the original function unchanged.
pub fn future_fn_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}

/// No-op version of `#[hotpath::skip]` when profiling is disabled.
///
/// This macro simply returns the original function unchanged.
pub fn skip_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}

/// No-op version of `#[hotpath::measure_all]` when profiling is disabled.
///
/// This macro simply returns the original item unchanged.
pub fn measure_all_impl(_attr: TokenStream, item: TokenStream) -> TokenStream {
    item
}