| 45 | } |
| 46 | |
| 47 | string Dashboard::title() { |
| 48 | const size_t WIDTH = 10; |
| 49 | std::time_t now_time = std::chrono::system_clock::to_time_t( |
| 50 | std::chrono::system_clock::now()); |
| 51 | string time_str = ctime(&now_time); |
| 52 | time_str.resize(time_str.size() - 1); |
| 53 | std::stringstream ss; |
| 54 | ss << std::setiosflags(std::ios::left) << |
| 55 | std::setw(WIDTH * 2) << std::setfill('=') << "" << " Dashboard " << |
| 56 | time_str + " " << std::setw(WIDTH * 2) << std::setfill('=') << "" << "\n"; |
| 57 | ss << std::setfill(' ') << |
| 58 | std::setw(WIDTH) << "Node" << |
| 59 | std::setw(WIDTH) << "Task" << |
| 60 | std::setw(WIDTH) << "MyCPU(%)" << |
| 61 | std::setw(WIDTH) << "MyRSS(M)" << |
| 62 | std::setw(WIDTH) << "MyVir(M)" << |
| 63 | std::setw(WIDTH) << "BusyTime" << |
| 64 | std::setw(WIDTH) << "InMB" << |
| 65 | std::setw(WIDTH) << "OutMB" << |
| 66 | std::setw(WIDTH) << "HostCPU" << |
| 67 | std::setw(WIDTH) << "HostUseGB" << |
| 68 | std::setw(WIDTH) << "HostInBW" << |
| 69 | std::setw(WIDTH) << "HostOutBW" << |
| 70 | std::setw(WIDTH * 2) << "HostName"; |
| 71 | return ss.str(); |
| 72 | } |
| 73 | |
| 74 | string Dashboard::report() { |
| 75 | mu_.lock(); |