MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / Report

Method Report

source/util/timer.cpp:67–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void Timer::Report(const char* tag) {
68 if (!report_stream_) return;
69
70 report_stream_->precision(2);
71 *report_stream_ << std::fixed << std::setw(30) << tag;
72
73 if (usage_status_ & kClockGettimeCPUtimeFailed)
74 *report_stream_ << std::setw(12) << "Failed";
75 else
76 *report_stream_ << std::setw(12) << CPUTime();
77
78 if (usage_status_ & kClockGettimeWalltimeFailed)
79 *report_stream_ << std::setw(12) << "Failed";
80 else
81 *report_stream_ << std::setw(12) << WallTime();
82
83 if (usage_status_ & kGetrusageFailed) {
84 *report_stream_ << std::setw(12) << "Failed" << std::setw(12) << "Failed";
85 if (measure_mem_usage_) {
86 *report_stream_ << std::setw(12) << "Failed" << std::setw(12) << "Failed";
87 }
88 } else {
89 *report_stream_ << std::setw(12) << UserTime() << std::setw(12)
90 << SystemTime();
91 if (measure_mem_usage_) {
92 *report_stream_ << std::fixed << std::setw(12) << RSS() << std::setw(16)
93 << PageFault();
94 }
95 }
96 *report_stream_ << std::endl;
97}
98
99} // namespace utils
100} // namespace spvtools

Callers 2

~ScopedTimerMethod · 0.80
TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64