Skip to main content

Crate smelt_perf

Crate smelt_perf 

Source
Expand description

Lightweight allocation + timing instrumentation.

Two coordinated pieces:

Designed to be embedded in any binary: install Counting as #[global_allocator], call alloc::enable() and perf::enable() early in main, sprinkle let _g = perf::begin(...); around interesting scopes.

Modules§

alloc
Counting global-allocator shim. Process-wide counters always update so peak / current / dealloc stats stay consistent across the whole run; per-thread tallies (used by crate::perf::Guard) only update when enable has been called. Install via #[global_allocator] in the binary crate.
perf
Labelled scope guards plus a pretty-printer.