gather some statistics about the last call to do_cycle()
| 629 | |
| 630 | // gather some statistics about the last call to do_cycle() |
| 631 | string getStatus (color_ostream &out) { |
| 632 | std::map<Reason,int> stats; |
| 633 | |
| 634 | for (auto [_ , reason] : suspensions) { |
| 635 | stats[reason == Reason::DEADEND ? Reason::RISK_BLOCKING : reason]++; |
| 636 | } |
| 637 | |
| 638 | std::stringstream res; |
| 639 | res << "suspended " << num_suspend << " and unsuspended " << num_unsuspend << " jobs\n"; |
| 640 | res << "maintaining " << suspensions.size() << " suspension reasons\n"; |
| 641 | for (auto stat : stats) { |
| 642 | res << std::setw(5) << stat.second << "x " << reasonToString(stat.first) << std::endl; |
| 643 | } |
| 644 | |
| 645 | return res.str(); |
| 646 | } |
| 647 | |
| 648 | void refresh(color_ostream &out) |
| 649 | { |
no test coverage detected