Go to the documentation of this file.
21 #ifndef THUNDEREGG_TIMER_H
22 #define THUNDEREGG_TIMER_H
31 #include <ThunderEgg/tpl/json.hpp>
74 std::unique_ptr<Timing> root;
79 std::list<std::reference_wrapper<Timing>> stack;
80 std::map<int, tpl::nlohmann::json> domains;
96 void start(
const std::string& name);
104 void stop(
const std::string& name);
112 void addDomain(
int domain_id, tpl::nlohmann::json domain);
139 void startPatchTiming(
int patch_id,
int domain_id,
const std::string& name);
150 void stopPatchTiming(
int patch_id,
int domain_id,
const std::string& name);
163 void addIntInfo(
const std::string& name,
int info);
193 friend void to_json(tpl::nlohmann::json& j,
const Timer& timer);
201 void saveToFile(
const std::string& filename)
const;
Timer(const Communicator &comm)
Construct a new empty Timer object.
~Timer()
Destruct a Timer object.
void addDoubleInfo(const std::string &name, double info)
Add information to a timing.
The ThunderEgg namespace.
Definition: BiLinearGhostFiller.h:31
void addDomain(int domain_id, tpl::nlohmann::json domain)
add a domain to to timer
friend void to_json(tpl::nlohmann::json &j, const Timer &timer)
Convert a timer to a json serialization, this is collective over all processes will only result in a ...
void start(const std::string &name)
Start a new timing.
void stop(const std::string &name)
Stop a timing.
void startPatchTiming(int patch_id, int domain_id, const std::string &name)
Start a new Domain associated timing.
void stopDomainTiming(int domain_id, const std::string &name)
Stop a Domain associated timing.
void startDomainTiming(int domain_id, const std::string &name)
Start a new Domain associated timing.
Class for keeping track of parallel timings.
Definition: Timer.h:60
wrapper arount MPI_Comm, provides proper copy operators. Classes that have a communicator are meant t...
Definition: Communicator.h:36
void stopPatchTiming(int patch_id, int domain_id, const std::string &name)
Stop a Domain associated timing.
friend std::ostream & operator<<(std::ostream &os, const Timer &timer)
ostream operator for Timer, this is collective for all ranks, will only output on rank 0
void addIntInfo(const std::string &name, int info)
Add information to a timing.
void saveToFile(const std::string &filename) const
Save a json representation of the timer to the file. This is collective over all processes.