Celeritas 0.6.0-rc.2.10+develop.de0a3a05
|
Collect timing results and output at the end of a run. More...
#include <TimeOutput.hh>
Public Types | |
Type aliases | |
using | MapStrReal = std::unordered_map< std::string, real_type > |
![]() | |
enum class | Category { input , result , system , internal , size_ } |
Output category (TODO: could replace with string/cstring?) | |
Public Member Functions | |
TimeOutput (size_type num_threads) | |
Construct with number of threads. | |
void | RecordActionTime (MapStrReal &&time) |
Record the accumulated action times. | |
void | RecordEventTime (real_type time) |
Record the time for the event. | |
void | RecordSetupTime (real_type time) |
Record the time for setting up Celeritas. | |
void | RecordTotalTime (real_type time) |
Record the total time spent in transport and hit I/O (excluding setup). | |
Output interface | |
Category | category () const final |
Category of data to write. | |
std::string_view | label () const final |
Key for the entry inside the category. | |
void | output (JsonPimpl *) const final |
Write output to the given JSON object. | |
Collect timing results and output at the end of a run.
Setup time and total time are always recorded. Event time is recorded if BeginOfEventAction
and EndOfEventAction
are called. The accumulated action times are recorded when running on the host or on the device with synchronization enabled.
All results are in units of seconds.
|
inlinefinalvirtual |
Category of data to write.
Implements celeritas::OutputInterface.
|
inlinefinalvirtual |
Key for the entry inside the category.
Implements celeritas::OutputInterface.
Write output to the given JSON object.
Implements celeritas::OutputInterface.
Record the time for setting up Celeritas.
This should be called once by the master thread.
Record the total time spent in transport and hit I/O (excluding setup).
This should be called once by the master thread.