[go: up one dir, main page]

Crate coz

Source
Expand description

Rust support for the coz Causal Profiler

This crate is a translation of the coz.h header file provided by coz to Rust, and enables profiling Rust programs with coz to profile throughput and latency.

For usage information, consult the README.md for the coz repository as well as the README.md for coz-rs.

Macros§

begin
Equivalent of the COZ_BEGIN macro
end
Equivalent of the COZ_END macro
progress
Equivalent of the COZ_PROGRESS and COZ_PROGRESS_NAMED macros
scope
Marks a lexical scope with coz::begin! and coz::end! which are executed even on early exit (e.g. via return, ? or panic!).

Structs§

Counter
A coz-counter which is either intended for throughput or begin/end points.
Guard
A type that increments a counter on drop. This allows us to issue the right coz calls to begin and end for the duration of a scope, regardless of how the scope was exited (e.g. by early return, ? or panic).

Functions§

thread_init
Perform one-time per-thread initialization for coz.