From 3a33a5386b06f6848d41fd4078ccbb3bf0082932 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 1 Dec 2024 11:32:36 -0500 Subject: [PATCH] context: add a PROGRESS: header in $BEESSTATUS Make it clearer where the progress information goes. Also add placeholder text so the progress section isn't empty at startup, when the progress hasn't been calculated yet. Signed-off-by: Zygo Blaxell --- src/bees-context.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bees-context.cc b/src/bees-context.cc index dd46c7c..d9901c8 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -98,6 +98,7 @@ BeesContext::dump_status() TaskMaster::print_queue(ofs); #endif + ofs << "PROGRESS:\n"; ofs << get_progress(); ofs.close(); @@ -125,6 +126,9 @@ string BeesContext::get_progress() { unique_lock lock(m_progress_mtx); + if (m_progress_str.empty()) { + return "[No progess estimate available]\n"; + } return m_progress_str; }