mirror of
https://github.com/Zygo/bees.git
synced 2025-07-02 08:42:27 +02:00
progress: put the progress table in the stats and status files
Make the progress information more accessible, without having to enable full debug log and fish it out of the stream with grep. Also increase the progress log level to INFO. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
@ -98,6 +98,8 @@ BeesContext::dump_status()
|
||||
TaskMaster::print_queue(ofs);
|
||||
#endif
|
||||
|
||||
ofs << get_progress();
|
||||
|
||||
ofs.close();
|
||||
|
||||
BEESNOTE("renaming status file '" << status_file << "'");
|
||||
@ -112,6 +114,20 @@ BeesContext::dump_status()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BeesContext::set_progress(const string &str)
|
||||
{
|
||||
unique_lock<mutex> lock(m_progress_mtx);
|
||||
m_progress_str = str;
|
||||
}
|
||||
|
||||
string
|
||||
BeesContext::get_progress()
|
||||
{
|
||||
unique_lock<mutex> lock(m_progress_mtx);
|
||||
return m_progress_str;
|
||||
}
|
||||
|
||||
void
|
||||
BeesContext::show_progress()
|
||||
{
|
||||
@ -159,6 +175,8 @@ BeesContext::show_progress()
|
||||
BEESLOGINFO("\ttid " << t.first << ": " << t.second);
|
||||
}
|
||||
|
||||
// No need to log progress here, it is logged when set
|
||||
|
||||
lastStats = thisStats;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user