metrics-utils-macros 0.1.0

Procedural utility macros for ease of recording metrics.
Documentation
  • Coverage
  • 66.67%
    2 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 8.05 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 288.09 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • roeezolantz

metrics-utils-macros

Procedural macros for measuring function execution time and recording metrics in Rust applications.

Features

  • Attribute macro for measuring async function duration
  • Attribute macro for measuring sync function duration

Usage

Add this to your Cargo.toml:

[dependencies]
metrics-utils-macros = "0.1.0"

Annotate your functions:

use metrics_utils_macros::{measured_async_function, measured_function};

#[measured_async_function]
async fn my_async_fn() {
    // ...
}

#[measured_function]
fn my_fn() {
    // ...
}

Documentation

See docs.rs/metrics-utils-macros for full documentation.

License

MIT OR Apache-2.0

Contribution

Contributions are welcome! Please open issues or pull requests on GitHub. # metrics-utils-macros