|
preCICE v3.3.0
|
#include <Event.hpp>
Classes | |
| struct | Options |
Public Types | |
| enum class | State : bool { STOPPED = false , RUNNING = true } |
| using | Clock = std::chrono::steady_clock |
| Default clock type. All other chrono types are derived from it. | |
Public Member Functions | |
| template<typename... Args> | |
| constexpr Options | optionsFromTags (Args... args) |
| template<typename... Args> | |
| Event (std::string_view eventName, Args... args) | |
| Event (std::string_view eventName, Options options) | |
| Event (Event &&)=default | |
| Event & | operator= (Event &&)=default |
| Event (const Event &other)=delete | |
| Event & | operator= (const Event &)=delete |
| ~Event () | |
| Stops the event if it's running and report its times to the EventRegistry. | |
| void | start () |
| Starts or restarts a stopped event. | |
| void | stop () |
| Stops a running event. | |
| void | addData (std::string_view key, int value) |
| Adds named integer data, associated to an event. | |
Public Attributes | |
| std::string | name |
| Name used to identify the timer. Events of the same name are accumulated to. | |
Private Attributes | |
| int | _eid |
| int | _sid {-1} |
| State | _state = State::STOPPED |
| Group | _group = Group::Default |
| bool | _synchronize {false} |
Represents an event that can be started and stopped.
Also allows to attach data in a key-value format using addData()
The event keeps minimal state. Events are passed to the EventRegistry.
|
strong |
|
inline |
| precice::profiling::Event::Event | ( | std::string_view | eventName, |
| Options | options ) |
|
default |
|
delete |
| precice::profiling::Event::~Event | ( | ) |
Stops the event if it's running and report its times to the EventRegistry.
Definition at line 21 of file Event.cpp.
| void precice::profiling::Event::addData | ( | std::string_view | key, |
| int | value ) |
|
inlineconstexpr |
| void precice::profiling::Event::start | ( | ) |
| void precice::profiling::Event::stop | ( | ) |
|
private |
|
private |
|
private |
| std::string precice::profiling::Event::name |