#include <EventUtils.hpp>
|
std::string | prefix |
| Currently active prefix. Changing that applies only to newly created events.
|
|
|
| EventRegistry ()=default |
| Private, empty constructor for singleton pattern.
|
|
void | stopBackend () |
| Stops the global event, flushes the buffers and closes the filestream.
|
|
High level object that stores data of all events.
Call EventRegistry::initialize at the beginning of your application and EventRegistry::finalize at the end.
Use setWriteQueueMax() to adjust buffering behaviour.
Definition at line 80 of file EventUtils.hpp.
◆ ~EventRegistry()
precice::profiling::EventRegistry::~EventRegistry |
( |
| ) |
|
◆ EventRegistry() [1/3]
precice::profiling::EventRegistry::EventRegistry |
( |
EventRegistry const & | | ) |
|
|
delete |
Deleted copy and move SMFs for singleton pattern.
◆ EventRegistry() [2/3]
precice::profiling::EventRegistry::EventRegistry |
( |
EventRegistry && | | ) |
|
|
delete |
◆ EventRegistry() [3/3]
precice::profiling::EventRegistry::EventRegistry |
( |
| ) |
|
|
privatedefault |
Private, empty constructor for singleton pattern.
◆ accepting()
bool precice::profiling::EventRegistry::accepting |
( |
EventClass | ec | ) |
const |
|
inline |
Should an event of this class be forwarded to the registry?
Definition at line 126 of file EventUtils.hpp.
◆ clear()
void precice::profiling::EventRegistry::clear |
( |
| ) |
|
◆ finalize()
void precice::profiling::EventRegistry::finalize |
( |
| ) |
|
Sets the global end time and flushes buffers.
Definition at line 165 of file EventUtils.cpp.
◆ flush()
void precice::profiling::EventRegistry::flush |
( |
| ) |
|
Writes all recorded events to file and flushes the buffer.
Definition at line 232 of file EventUtils.cpp.
◆ initialize()
void precice::profiling::EventRegistry::initialize |
( |
std::string_view | applicationName, |
|
|
int | rank = 0, |
|
|
int | size = 1 ) |
Sets the global start time.
- Parameters
-
[in] | applicationName | A name that is added to the logfile to distinguish different participants |
[in] | rank | the current number of the parallel instance |
[in] | size | the total number of a parallel instances |
Definition at line 55 of file EventUtils.cpp.
◆ instance()
◆ nameToID()
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ put()
void precice::profiling::EventRegistry::put |
( |
PendingEntry | pe | ) |
|
◆ setDirectory()
void precice::profiling::EventRegistry::setDirectory |
( |
std::string_view | directory | ) |
|
Sets the directory where to write the event files to.
Definition at line 82 of file EventUtils.cpp.
◆ setMode()
void precice::profiling::EventRegistry::setMode |
( |
Mode | mode | ) |
|
Sets the operational mode of the registry.
Definition at line 87 of file EventUtils.cpp.
◆ setWriteQueueMax()
void precice::profiling::EventRegistry::setWriteQueueMax |
( |
std::size_t | size | ) |
|
Sets the maximum size of the writequeue before calling flush(). Use 0 to flush on destruction.
Definition at line 77 of file EventUtils.cpp.
◆ startBackend()
void precice::profiling::EventRegistry::startBackend |
( |
| ) |
|
Create the file and starts the filestream if profiling is turned on.
Definition at line 107 of file EventUtils.cpp.
◆ stopBackend()
void precice::profiling::EventRegistry::stopBackend |
( |
| ) |
|
|
private |
Stops the global event, flushes the buffers and closes the filestream.
Definition at line 148 of file EventUtils.cpp.
◆ _applicationName
std::string precice::profiling::EventRegistry::_applicationName |
|
private |
◆ _directory
std::string precice::profiling::EventRegistry::_directory |
|
private |
◆ _finalized
bool precice::profiling::EventRegistry::_finalized = false |
|
private |
◆ _firstwrite
bool precice::profiling::EventRegistry::_firstwrite = true |
|
private |
Indicator for the first record to be written.
Definition at line 152 of file EventUtils.hpp.
◆ _globalId
◆ _initClock
Event::Clock::time_point precice::profiling::EventRegistry::_initClock |
|
private |
The initial time clock, used to take runtime measurements.
Definition at line 174 of file EventUtils.hpp.
◆ _initialized
bool precice::profiling::EventRegistry::_initialized = false |
|
private |
◆ _initTime
std::chrono::system_clock::time_point precice::profiling::EventRegistry::_initTime |
|
private |
The initial time, used to describe when the run started.
Definition at line 177 of file EventUtils.hpp.
◆ _isBackendRunning
bool precice::profiling::EventRegistry::_isBackendRunning = false |
|
private |
◆ _log
◆ _mode
◆ _nameDict
◆ _output
◆ _rank
int precice::profiling::EventRegistry::_rank = 0 |
|
private |
The rank/number of parallel instance of the current program.
Definition at line 146 of file EventUtils.hpp.
◆ _size
int precice::profiling::EventRegistry::_size = 1 |
|
private |
The amount of parallel instances of the current program.
Definition at line 149 of file EventUtils.hpp.
◆ _writeQueue
◆ _writeQueueMax
std::size_t precice::profiling::EventRegistry::_writeQueueMax = 0 |
|
private |
◆ prefix
Currently active prefix. Changing that applies only to newly created events.
Definition at line 134 of file EventUtils.hpp.
The documentation for this class was generated from the following files: