asge::profiling::TimingProfiler
Singleton registry of named timing buckets.
#include <TimingProfiler.hpp>Thread-safe: bucket lookup/creation is mutex-guarded, but recording a sample into an already-existing bucket is lock-free (see TimingBucket::Record).
Private Attributes
Private Member Functions
Static Public Member Functions
#
static TimingProfiler & Instance()Public Member Functions
#
TimingProfiler(TimingProfiler const &)=delete#
TimingProfiler & operator=(TimingProfiler const &)=delete#
TimingBucket & GetOrCreateBucket(str::StringView inName)Returns a reference to the bucket for inName, creating it if absent.
Intended to be cached at the call site (see ScopedTimer) so the lock is only paid once per unique scope name, not on every call.
#
void ResetAll()Zeroes every bucket's stats.
Call once per frame if you want per-frame numbers.
#
void LogSummary() const