Crate innumerable

Source
Expand description

A simple crate for counting events in Rust libraries.

This library is designed to be used in performance-sensitive code to gather statistics about the frequency of events. It can handle tens of millions of events per second on a single core with manageable performance overhead. Capturing events doesn’t require passing any global context, making it well suited to instrument and optimize low level libraries within a larger program. Events are accumulated into thread-local counters and can be printed out at the end of the program.

§Example

// Capture an event
innumerable::event!("event_name", 12);

// At program completion, print out the counts
innumerable::print_counts();

Macros§

event
Count an event.

Functions§

print_counts
Print out the counts of all events.