| 120 | |
| 121 | |
| 122 | void BenchMark::Stat(const int vtid, const int ret, const uint64_t used_time_ms, const int sleep_ms) { |
| 123 | |
| 124 | |
| 125 | StatData *stat = &impl_->stats[vtid]; |
| 126 | MutexGuard guard(&stat->mutex); |
| 127 | |
| 128 | ++stat->res_st[ret]; |
| 129 | ++stat->time_st[used_time_ms]; |
| 130 | if (sleep_ms) ++stat->nroutine_sleep; |
| 131 | } |
| 132 | |
| 133 | void BenchMark::ThreadRun(const int vtid) { |
| 134 | stCoRoutineAttr_t attr; |