Skip to content

Commit

Permalink
Print a partial taskprogress when perc_done is less than 1%. Fixes nm…
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Oct 11, 2018
1 parent 53f5f56 commit dc238cf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion timing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,13 @@ bool ScanProgressMeter::printStats(double perc_done,
if (perc_done < 0.01) {
log_write(LOG_STDOUT, "%s Timing: About %.2f%% done\n",
scantypestr, perc_done * 100);
log_flush(LOG_STDOUT);
xml_open_start_tag("taskprogress");
xml_attribute("task", "%s", scantypestr);
xml_attribute("time", "%lu", (unsigned long) now->tv_sec);
xml_attribute("percent", "%.2f", perc_done * 100);
xml_close_empty_tag();
xml_newline();
log_flush(LOG_STDOUT|LOG_XML);
return true;
}

Expand Down

0 comments on commit dc238cf

Please sign in to comment.