| 186 | } |
| 187 | |
| 188 | int64_t TaskGroup::cumulated_cputime_ns() const { |
| 189 | CPUTimeStat cpu_time_stat = _cpu_time_stat.load(); |
| 190 | // Add the elapsed time of running bthread. |
| 191 | int64_t cumulated_cputime_ns = cpu_time_stat.cumulated_cputime_ns(); |
| 192 | if (!cpu_time_stat.is_main_task()) { |
| 193 | cumulated_cputime_ns += butil::cpuwide_time_ns() - cpu_time_stat.last_run_ns(); |
| 194 | } |
| 195 | return cumulated_cputime_ns; |
| 196 | } |
| 197 | |
| 198 | void TaskGroup::run_main_task() { |
| 199 | bvar::PassiveStatus<double> cumulated_cputime( |
no test coverage detected