#attributes #zone #automatic #gizmo #procedural #proc-macro #instrument

macro tracy-gizmos-attributes

Procedural macro attributes for automatic function instrumentation

3 releases

0.0.3 Jan 31, 2024
0.0.2 Jan 19, 2024
0.0.1 Jan 19, 2024

#12 in #gizmo

40 downloads per month
Used in tracy-gizmos

MIT/Apache

14KB
203 lines

🧰 tracy-gizmos-attributes

Latest Version MIT licensed Apache licensed API

Overview

A procedural macro attribute for instrumenting functions with tracy-gizmos zones.

Usage

In the Cargo.toml:

[dependencies]
tracy-gizmos-attributes = "0.0.1"

The #[instrument] attribute can now be added to a function to automatically create and enter a tracy-gizmos zone when that function is called. For example:

#[tracy_gizmos_attributes::instrument]
fn work() {
    // do stuff
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps