Skip to main content

counter

Macro counter 

Source
macro_rules! counter {
    ($category:tt, $label:tt, $counter_id:expr $(, $key:tt => $val:expr)* $(,)?) => { ... };
}
Expand description

Writes a counter event associated with the current thread when the given category is enabled.

Each argument is rendered as a separate value series named “

§Arguments:

  • category: Filter category for the event. Expects a string literal or expression.
  • label: Label for the event. Expects a string literal or expression.
  • counter_id: Correlation id for the event. Must be convertible to u64.
  • …: List of key => value argument pairs.