From dc238cf08be3e762073bbc6115395f0e03473a6b Mon Sep 17 00:00:00 2001 From: dmiller Date: Thu, 11 Oct 2018 04:47:20 +0000 Subject: [PATCH] Print a partial taskprogress when perc_done is less than 1%. Fixes #1351 --- timing.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/timing.cc b/timing.cc index 2cd96ae96..54b6c975e 100644 --- a/timing.cc +++ b/timing.cc @@ -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; }