Skip to content

Procedure macro #10

@cmpute

Description

@cmpute

I think it will be more idiomatic to mark the profiling function like this

#[profile_fn]
fn fn_name<T>(param: T) {
    // If a function is complex, profile a section.
    #[profile_section]
    {
        // Optional: manually drop.
        // Section automatically drops when going out of scope.
        drop(inner);
    }
}

This API looks like the profiling crate, and it looks more ergonomic to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions