|
votca 2026-dev
|
Wall-clock accounting for the parts of a DFT run. More...
#include <dfttimings.h>

Classes | |
| class | Scope |
| struct | Entry |
Public Types | |
| using | Clock = std::chrono::steady_clock |
Public Member Functions | |
| Scope | Measure (const std::string &name) |
| void | Add (const std::string &name, double seconds) |
| void | Reset () |
| double | Elapsed () const |
| void | Report (Logger &log, Log::Level level, const std::string &title="DFT timing summary") const |
| Table of all entries with their share of the time since Reset(). | |
| std::string | Format () const |
| The entries on one line, "name 1.23 s, name 4.56 s". | |
Static Public Member Functions | |
| static double | ResidentMemoryGB (bool peak) |
Private Member Functions | |
| void | AddEntry (const std::string &name, double seconds) |
Private Attributes | |
| std::vector< Entry > | entries_ |
| std::vector< double > | nested_ |
| Clock::time_point | start_ = Clock::now() |
Wall-clock accounting for the parts of a DFT run.
Entries keep the order in which they were first used, so the report reads like the run. Scopes may nest; each entry holds only its own time, without the time of scopes nested inside it, so the entries add up to the total. Scopes must be opened and closed on one thread (the serial driver code), not inside OpenMP regions.
Definition at line 45 of file dfttimings.h.
| using votca::xtp::DFTTimings::Clock = std::chrono::steady_clock |
Definition at line 47 of file dfttimings.h.
|
inline |
Adds time measured elsewhere. Inside an open scope it is taken out of that scope's own time, as if it had been a nested scope.
Definition at line 78 of file dfttimings.h.
|
inlineprivate |
Definition at line 108 of file dfttimings.h.
|
inline |
Definition at line 91 of file dfttimings.h.
| std::string votca::xtp::DFTTimings::Format | ( | ) | const |
The entries on one line, "name 1.23 s, name 4.56 s".
Definition at line 58 of file dfttimings.cc.
|
inline |
Definition at line 74 of file dfttimings.h.
| void votca::xtp::DFTTimings::Report | ( | Logger & | log, |
| Log::Level | level, | ||
| const std::string & | title = "DFT timing summary" ) const |
Table of all entries with their share of the time since Reset().
Definition at line 29 of file dfttimings.cc.
|
inline |
Definition at line 85 of file dfttimings.h.
|
static |
Resident memory of this process in GB, read from /proc/self/status (VmRSS, or VmHWM for the peak). Returns a negative value where that file does not exist.
Definition at line 69 of file dfttimings.cc.
|
private |
Definition at line 124 of file dfttimings.h.
|
private |
Definition at line 125 of file dfttimings.h.
|
private |
Definition at line 126 of file dfttimings.h.