21#include <boost/format.hpp>
31 double accounted = 0.0;
32 XTP_LOG(level, log) <<
" DFT timing summary (wall clock)" << std::flush;
33 XTP_LOG(level, log) << (boost::format(
" %-38s %7s %11s %10s %6s") %
"part" %
34 "calls" %
"time [s]" %
"per call" %
"%")
38 accounted +=
e.seconds;
39 XTP_LOG(level, log) << (boost::format(
" %-38s %7d %11.2f %10.3f %6.1f") %
40 e.name %
e.calls %
e.seconds %
41 (
e.seconds / double(
e.calls)) %
42 (total > 0 ? 100.0 *
e.seconds / total : 0.0))
46 XTP_LOG(level, log) << (boost::format(
" %-38s %7s %11.2f %10s %6.1f") %
47 "not itemised" %
"" % (total - accounted) %
"" %
48 (total > 0 ? 100.0 * (total - accounted) / total
53 << (boost::format(
" %-38s %7s %11.2f") %
"total" %
"" % total).str()
58 std::ifstream status(
"/proc/self/status");
59 if (!status.is_open()) {
62 const std::string key = peak ?
"VmHWM:" :
"VmRSS:";
64 while (status >> word) {
68 return kb / (1024.0 * 1024.0);
std::vector< Entry > entries_
void Report(Logger &log, Log::Level level) const
Table of all entries with their share of the time since Reset().
static double ResidentMemoryGB(bool peak)
Logger is used for thread-safe output of messages.
#define XTP_LOG(level, log)
Charge transport classes.
Provides a means for comparing floating point numbers.