Skip to content

ludus::input::InputDebugTrace

Ludus Wiki · API overview · Browse API

Class

Fixed-capacity, main-thread diagnostic ring; wrapped or lossy traces are incomplete for replay.

Declared in modules/input/include/ludus/input/input_debug.h

#include <ludus/input/input_debug.h>
class ludus::input::InputDebugTrace final

Methods

InputDebugTrace

ludus::input::InputDebugTrace::InputDebugTrace() noexcept=default

Declared in modules/input/include/ludus/input/input_debug.h

Record

void ludus::input::InputDebugTrace::Record(const TraceEntry &entry) noexcept
Record one entry.
Called by InputSystem on the main thread; cheap, bounded, no allocation, no formatting. Overflow wraps the ring and marks truncation.

Related types: TraceEntry

Declared in modules/input/include/ludus/input/input_debug.h

View

std::span< const TraceEntry > ludus::input::InputDebugTrace::View() const noexcept
Borrow the valid entries in chronological order from internal scratch storage.
The next View or destruction invalidates this view. Take it outside callbacks and copy the entries into caller-owned storage for retention.

Related types: TraceEntry

Declared in modules/input/include/ludus/input/input_debug.h

HasWrapped

bool ludus::input::InputDebugTrace::HasWrapped() const noexcept

Declared in modules/input/include/ludus/input/input_debug.h

GetTruncatedCount

uint64 ludus::input::InputDebugTrace::GetTruncatedCount() const noexcept
Count of entries dropped by ring wrap (trace loss), SEPARATE from gameplay overflow loss (which is counted as Overflow entries / InputCounters).

Related types: uint64

Declared in modules/input/include/ludus/input/input_debug.h

GetTotalRecorded

uint64 ludus::input::InputDebugTrace::GetTotalRecorded() const noexcept

Related types: uint64

Declared in modules/input/include/ludus/input/input_debug.h

IsCompleteForReplay

bool ludus::input::InputDebugTrace::IsCompleteForReplay() const noexcept
A wrapped trace, or one that saw gameplay overflow, cannot be replayed as an exact capture.

Declared in modules/input/include/ludus/input/input_debug.h

Clear

void ludus::input::InputDebugTrace::Clear() noexcept

Declared in modules/input/include/ludus/input/input_debug.h