|
Ultralight C API 2.0.0
|
User-defined profiling interface.
#include <Ultralight/CAPI/CAPI_Profiler.h>
When set, the library emits structured timing data (scopes, events, counters) at key internal boundaries that can be forwarded to any profiling tool or trace format.
This is intended to be implemented by users and set before creating the Renderer. The profiler must outlive the Renderer/App.
Classes | |
| struct | ULProfiler |
Typedefs | |
| typedef void(*) | ULProfilerBeginScopeCallback(const char *name) |
| The callback invoked when the library enters a named profiling scope. | |
| typedef void(*) | ULProfilerEndScopeCallback(void) |
| The callback invoked when the library exits the most recently entered scope. | |
| typedef void(*) | ULProfilerBeginFrameCallback(uint64_t frame_id) |
| The callback invoked when a new rendering frame begins. | |
| typedef void(*) | ULProfilerEndFrameCallback(void) |
| The callback invoked when a rendering frame ends. | |
| typedef void(*) | ULProfilerEmitEventCallback(const char *name, const char *detail) |
| The callback invoked for instant (point-in-time) annotations. | |
| typedef void(*) | ULProfilerEmitCounterCallback(const char *name, int64_t value) |
| The callback invoked for counter/gauge updates. | |
| typedef uint64_t(*) | ULProfilerBeginEventCallback(const char *name, const char *detail) |
| The callback invoked when an async event begins. | |
| typedef void(*) | ULProfilerEndEventCallback(uint64_t id) |
| The callback invoked when an async event ends. | |
| typedef uint64_t(*) ULProfilerBeginEventCallback(const char *name, const char *detail) |
The callback invoked when an async event begins.
| name | Static string literal identifying the event type. |
| detail | Optional detail string (may be NULL). |
| typedef void(*) ULProfilerBeginFrameCallback(uint64_t frame_id) |
The callback invoked when a new rendering frame begins.
Called automatically by the library.
| frame_id | Monotonic frame counter. |
| typedef void(*) ULProfilerBeginScopeCallback(const char *name) |
The callback invoked when the library enters a named profiling scope.
| name | Static string literal identifying the scope (e.g., "Ultralight.Layout"). Pointer is stable for the lifetime of the library. |
| typedef void(*) ULProfilerEmitCounterCallback(const char *name, int64_t value) |
The callback invoked for counter/gauge updates.
| name | Static string literal identifying the counter. |
| value | Current value of the counter. |
| typedef void(*) ULProfilerEmitEventCallback(const char *name, const char *detail) |
The callback invoked for instant (point-in-time) annotations.
| name | Static string literal identifying the event. |
| detail | Optional detail string (may be NULL). |
| typedef void(*) ULProfilerEndEventCallback(uint64_t id) |
The callback invoked when an async event ends.
| id | The event ID returned by begin_event. |
| typedef void(*) ULProfilerEndFrameCallback(void) |
The callback invoked when a rendering frame ends.
Called automatically by the library.
| typedef void(*) ULProfilerEndScopeCallback(void) |
The callback invoked when the library exits the most recently entered scope.