Skip to content
Snippets Groups Projects
Commit d3040cc2 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #11122: Do not print average runtime if timer did not run

parent ea99cef6
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,9 @@ namespace LOFAR { ...@@ -45,7 +45,9 @@ namespace LOFAR {
const double realTimePerc = 100.0 * getAverage() / budget; const double realTimePerc = 100.0 * getAverage() / budget;
if (log_on_destruction) { if (log_on_destruction) {
if (realTimePerc >= 100.0) { if (getCount() == 0) {
LOG_DEBUG_STR(std::left << std::setw(25) << itsName << ": did not run");
} else if (realTimePerc >= 100.0) {
LOG_ERROR_STR(std::left << std::setw(25) << itsName << ": ran at " << realTimePerc << "% of run-time budget"); LOG_ERROR_STR(std::left << std::setw(25) << itsName << ": ran at " << realTimePerc << "% of run-time budget");
} else { } else {
LOG_INFO_STR(std::left << std::setw(25) << itsName << ": ran at " << realTimePerc << "% of run-time budget"); LOG_INFO_STR(std::left << std::setw(25) << itsName << ": ran at " << realTimePerc << "% of run-time budget");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment