Kanzi 4.0.0-beta2
tracing.hpp File Reference

Classes

class  kanzi::EventScope< TCategory, TString, Enabled >
 Helper class to manage an event scope. More...
 
class  kanzi::EventScope< TCategory, TString, false >
 
struct  kanzi::TracingSettings
 Settings for the Tracing subsystem. More...
 

Namespaces

namespace  kanzi
 

Macros

#define KANZI_TRACING_BUILD
 This macro is defined when Kanzi tracing is available. Tracing is not available in the Release build configuration.
 
#define KZ_LOG_CATEGORY_TRACING
 The tracing log category.
 
#define KZ_LOG_DEFAULT_CATEGORY_TRACING_STATE
 Defines tracing log category state.
 
#define KZ_TRACE_CURRENT_TIMESTAMP
 
#define KZ_TRACING_CONCAT(a, b)
 
#define KZ_TRACING_CONCAT_INNER(a, b)
 
#define KZ_TRACING_UNIQUE_NAME(name)
 
#define kzTrace(category, name)
 Traces a scope using the tracing subsystem.
 
#define kzTraceAdvanceFrame()
 Advance the tracing subsytem frame.
 
#define kzTraceApplySettings(settings)
 Apply new tracing subsystem settings.
 
#define kzTraceCreateCategory(type, title, desc, enabled)
 Defines a Tracing category that can be used to enable and disable trace scopes.
 
#define kzTraceDynamic(category, name)
 Traces a scope using the tracing subsystem with a dynamic scope name.
 
#define kzTraceInitialize()
 Initializes the Kanzi tracing subsystem.
 
#define kzTraceInstant(category, name)
 Traces an instant event to the tracing subsystem.
 
#define kzTraceSample(category, name, sample)
 Traces a sample using the tracing subsystem.
 
#define kzTraceSetThreadName(name)
 Sets the name of the current thread in the tracing subsystem.
 

Typedefs

using kanzi::TraceTimePoint
 The standard time point for the Tracing subsystem.
 

Functions

void kanzi::addTracingDurationEvent (uint16_t category, const string &name, TraceTimePoint start, TraceTimePoint end) noexcept
 Record a duration event with a dynamic name.
 
void kanzi::addTracingDurationEvent (uint16_t category, FixedString name, TraceTimePoint start, TraceTimePoint end) noexcept
 Record a duration event with a static name.
 
void kanzi::addTracingFrameEvent (TraceTimePoint time) noexcept
 Record a frame event.
 
void kanzi::addTracingInstantEvent (uint16_t category, FixedString name, TraceTimePoint time) noexcept
 Record an instant event with a static name.
 
void kanzi::addTracingSample (uint16_t category, FixedString name, TraceTimePoint time, double data) noexcept
 Record a floating point sample event with a static name.
 
void kanzi::addTracingSample (uint16_t category, FixedString name, TraceTimePoint time, int64_t data) noexcept
 Record an integer sample event with a static name.
 
void kanzi::applyTracingApplicationSettings (const TracingSettings &settings)
 Apply tracing settings.
 
void kanzi::clearTrace ()
 Clear the current tracing log.
 
void kanzi::initializeTracing ()
 Initialize the tracing subsystem.
 
 kzTraceCreateCategory (General, "General", "This is a general category.", true)
 
void kanzi::logTraceToFile (string_view fileName)
 Write the current tracing log to a file.
 
void kanzi::setTracingThreadName (string_view name)
 Sets the current thread name within the tracing system.
 

Macro Definition Documentation

◆ KZ_TRACE_CURRENT_TIMESTAMP

#define KZ_TRACE_CURRENT_TIMESTAMP

◆ KZ_TRACING_CONCAT_INNER

#define KZ_TRACING_CONCAT_INNER ( a,
b )

◆ KZ_TRACING_CONCAT

#define KZ_TRACING_CONCAT ( a,
b )

◆ KZ_TRACING_UNIQUE_NAME

#define KZ_TRACING_UNIQUE_NAME ( name)

◆ KZ_LOG_DEFAULT_CATEGORY_TRACING_STATE

#define KZ_LOG_DEFAULT_CATEGORY_TRACING_STATE

Defines tracing log category state.

The tracing log category is enabled by default.

See also
KZ_LOG_CATEGORY_TRACING

◆ KZ_LOG_CATEGORY_TRACING

#define KZ_LOG_CATEGORY_TRACING

The tracing log category.

Use this log category to write tracing logs only. The KZ_LOG_DEFAULT_CATEGORY_TRACING_STATE defines the state of this log category.

◆ KANZI_TRACING_BUILD

#define KANZI_TRACING_BUILD

This macro is defined when Kanzi tracing is available. Tracing is not available in the Release build configuration.

Function Documentation

◆ kzTraceCreateCategory()

kzTraceCreateCategory ( General ,
"General" ,
"This is a general category." ,
true  )