IProfiler

Allows to generate a Trace Event Format profile JSON.

Members

Functions

begin
IProfiler begin(const(char)[] nameZ)

This Begin/End Event will be added to the queue. Events can be added from whatever thread. But within the same threads, the begin/end events are nested and must be balanced. nameZ must be be a zero-terminated slice (zero not counted in length).

category
IProfiler category(const(char)[] categoryZ)

All functions for this interface can be called from many threads at once. However, from the same thread, there is an ordering. - begin/end pairs must be balanced, per-thread - begin/end pairs can be nested, per-thread - category must come outside of a begin/end pair Set current category for pending begin and instant events, for the current thread. categoryZ must be a zero-terminated slice (zero not counted in length). This is thread-safe and can be called from multiple threads.

end
IProfiler end()

This Begin/End Event will be added to the queue. Events can be added from whatever thread. But within the same threads, the begin/end events are nested and must be balanced. nameZ must be be a zero-terminated slice (zero not counted in length).

instant
IProfiler instant(const(char)[] categoryZ)

Add an instant event to the trace. This is thread-safe and can be called from multiple threads.

toBytes
const(ubyte)[] toBytes()

Return a borrowed array of bytes for saving. Lifetime is tied to lifetime of the interface object. After toBytes is called, no recording function above can be called.

Meta