|
Yaets
|
Singleton class to manage global NamedSharedTrace instances. More...
#include <tracing.hpp>
Public Member Functions | |
| void | endTrace (const std::string &id) |
| End a trace identified by a unique ID. | |
| void | registerTrace (const std::string &id, TraceSession &session) |
| Register a new NamedSharedTrace with a unique identifier. | |
| void | startTrace (const std::string &id) |
| Start a trace identified by a unique ID. | |
Static Public Member Functions | |
| static TraceRegistry & | getInstance () |
| Retrieve the singleton instance of the TraceRegistry. | |
Singleton class to manage global NamedSharedTrace instances.
The TraceRegistry maintains a collection of NamedSharedTrace instances, identified by unique IDs, allowing traces to be started and ended globally through macros and without explicit object references.
| void endTrace | ( | const std::string & | id | ) |
End a trace identified by a unique ID.
This function ends the NamedSharedTrace associated with the given ID, marking the end of a traced section.
| id | The unique identifier for the trace to end. |
|
static |
Retrieve the singleton instance of the TraceRegistry.
This function returns the single, globally accessible instance of the TraceRegistry.
| void registerTrace | ( | const std::string & | id, |
| TraceSession & | session ) |
Register a new NamedSharedTrace with a unique identifier.
This function registers a NamedSharedTrace instance associated with a given ID and TraceSession, allowing the trace to be managed globally.
| id | The unique identifier for the trace. |
| session | The TraceSession associated with the trace. |
| void startTrace | ( | const std::string & | id | ) |
Start a trace identified by a unique ID.
This function starts the NamedSharedTrace associated with the given ID, marking the beginning of a traced section.
| id | The unique identifier for the trace to start. |