Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ApplicationObserver Struct Reference

Optional synchronous measurement sink; disabled by default. The borrowed observer must outlive run or active session cleanup. It must not perform I/O, mutate/reenter the application, or retain borrowed state. It may collect bounded samples. Exceptions fail run explicitly. More...

#include <application.hpp>

Public Types

using Callback = void (*)(void *context, ApplicationPhase phase, std::chrono::nanoseconds elapsed)
 Receive one completed phase duration; called outside tree frames.

Public Attributes

Callback callback {}
 Null disables measurements and their clock reads.
void * context {}
 Borrowed synchronous callback state.

Detailed Description

Optional synchronous measurement sink; disabled by default. The borrowed observer must outlive run or active session cleanup. It must not perform I/O, mutate/reenter the application, or retain borrowed state. It may collect bounded samples. Exceptions fail run explicitly.

Member Typedef Documentation

◆ Callback

using portals::ApplicationObserver::Callback = void (*)(void *context, ApplicationPhase phase, std::chrono::nanoseconds elapsed)

Receive one completed phase duration; called outside tree frames.

Parameters
contextBorrowed observer state.
phaseCompleted measured operation.
elapsedWall duration measured with steady_clock, independent of an injected logical clock. CONTROL_LATENCY instead reports the logical queue delay of this runner's input/resize channel only.

The documentation for this struct was generated from the following file: