25static constexpr bool isOptionsTag = std::is_same_v<T, FundamentalTag> || std::is_same_v<T, SynchronizeTag>;
47 bool synchronized =
false;
60 template <
typename... Args>
63 static_assert((isOptionsTag<Args> && ...),
"The Event only accepts tags as arguments.");
65 (options.
handle(args), ...);
69 template <
typename... Args>
void start()
Starts or restarts a stopped event.
void stop()
Stops a running event.
Event & operator=(const Event &)=delete
constexpr Options optionsFromTags(Args... args)
Event & operator=(Event &&)=default
std::string name
Name used to identify the timer. Events of the same name are accumulated to.
Event(std::string_view eventName, Args... args)
~Event()
Stops the event if it's running and report its times to the EventRegistry.
Event(const Event &other)=delete
void addData(std::string_view key, int value)
Adds named integer data, associated to an event.
Class that changes the prefix in its scope.
ScopedEventPrefix(std::string_view name)
contains profiling utilities.
static constexpr FundamentalTag Fundamental
Convenience instance of the FundamentalTag.
static constexpr bool isOptionsTag
static constexpr SynchronizeTag Synchronize
Convenience instance of the SynchronizeTag.
void handle(SynchronizeTag)
void handle(FundamentalTag)
Tag to annotate fundamental events.
Tag to annotate synchronized events.