slight cleanup to ProgressBar::getStatus()
Binaries were identical before and after this commit on our machine Change-Id: I6f8bfbe3298d6c5f43d5702c7a1e05cb180226cc
This commit is contained in:
parent
85f282ef57
commit
706f482216
1 changed files with 6 additions and 6 deletions
|
@ -414,18 +414,18 @@ public:
|
||||||
|
|
||||||
std::string getStatus(State & state)
|
std::string getStatus(State & state)
|
||||||
{
|
{
|
||||||
auto MiB = 1024.0 * 1024.0;
|
constexpr auto MiB = 1024.0 * 1024.0;
|
||||||
|
|
||||||
std::string res;
|
std::string res;
|
||||||
|
|
||||||
auto renderActivity = [&](ActivityType type, const std::string & itemFmt, const std::string & numberFmt = "%d", double unit = 1) {
|
auto renderActivity = [&](ActivityType type, const std::string & itemFmt, const std::string & numberFmt = "%d", double unit = 1) {
|
||||||
auto & act = state.activitiesByType[type];
|
auto & act = state.activitiesByType[type];
|
||||||
uint64_t done = act.done, expected = act.done, running = 0, failed = act.failed;
|
uint64_t done = act.done, expected = act.done, running = 0, failed = act.failed;
|
||||||
for (auto & j : act.its) {
|
for (auto & [actId, infoIt] : act.its) {
|
||||||
done += j.second->done;
|
done += infoIt->done;
|
||||||
expected += j.second->expected;
|
expected += infoIt->expected;
|
||||||
running += j.second->running;
|
running += infoIt->running;
|
||||||
failed += j.second->failed;
|
failed += infoIt->failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
expected = std::max(expected, act.expected);
|
expected = std::max(expected, act.expected);
|
||||||
|
|
Loading…
Reference in a new issue