Class SimpleProfiler

Nested Relationships

Nested Types

Class Documentation

class SimpleProfiler

Singleton class for managing profiling scopes and reporting elapsed times.

Public Functions

inline void pushScope()

Push a new scope level onto the stack.

inline void popScope()

Pop the current scope level from the stack.

inline void finalize()

Finalize profiling for the current frame, recording elapsed times.

inline void print(std::ostream &os) const

Print detailed timing data in a formatted tree structure.

Parameters:

os[in] The output stream to write to.

inline void setEnabled(bool is_enabled)

Enable or disable profiling globally.

Parameters:

is_enabled[in] True to enable profiling, false to disable.

Public Static Functions

static inline SimpleProfiler &instance()

Access the singleton instance of the Profiler.

class ScopedTimer

A RAII timer that starts on construction and stops on destruction.

Intended for automatic profiling of scoped code blocks.

Public Functions

inline ScopedTimer(const std::string &name)
inline ~ScopedTimer()