6 releases

0.0.6 Oct 11, 2024
0.0.5 Oct 11, 2024
0.0.1 Sep 29, 2024

#1308 in Algorithms

Download history 352/week @ 2024-09-28 355/week @ 2024-10-05 189/week @ 2024-10-12 72/week @ 2024-10-19 15/week @ 2024-10-26 15/week @ 2024-11-02 1/week @ 2024-11-09

109 downloads per month
Used in 7 crates (4 directly)

MIT license

9KB
168 lines

Metricator

Crates.io License: MIT

Metricator is a lightweight Rust library designed to help you track and analyze metrics effortlessly. It provides two main utilities:

  1. RateMetric: Evaluates how frequently events occur per second.
  2. AggregateMetric: Tracks minimum, maximum, and average values for various numeric data types.

Whether you're monitoring system performance, tracking user interactions, or analyzing data streams, Metricator offers a simple and efficient way to gather and process essential metrics.

Features

  • RateMetric:

    • Calculate event rates based on elapsed time intervals.
  • AggregateMetric:

    • Generic support for numeric types (i32, u32, f32, etc.).
    • Track minimum, maximum, and average values.
    • Configurable thresholds to trigger calculations.
  • Efficient and Lightweight: Minimal overhead, suitable for performance-critical applications.

Installation

Add metricator to your Cargo.toml:

[dependencies]
metricator = "^0.0.1"

Dependencies

~170KB