| 545 | } |
| 546 | |
| 547 | void Operator::recordBlockingTime(uint64_t start, BlockingReason reason) { |
| 548 | uint64_t now = |
| 549 | std::chrono::duration_cast<std::chrono::microseconds>( |
| 550 | std::chrono::high_resolution_clock::now().time_since_epoch()) |
| 551 | .count(); |
| 552 | const auto wallNanos = (now - start) * 1000; |
| 553 | const auto blockReason = blockingReasonToString(reason).substr(1); |
| 554 | |
| 555 | auto lockedStats = stats_.wlock(); |
| 556 | lockedStats->blockedWallNanos += wallNanos; |
| 557 | lockedStats->addRuntimeStat( |
| 558 | fmt::format("blocked{}WallNanos", blockReason), |
| 559 | RuntimeCounter(wallNanos, RuntimeCounter::Unit::kNanos)); |
| 560 | lockedStats->addRuntimeStat( |
| 561 | fmt::format("blocked{}Times", blockReason), RuntimeCounter(1)); |
| 562 | } |
| 563 | |
| 564 | void Operator::recordSpillStats(const common::SpillStats& spillStats) { |
| 565 | BOLT_CHECK(noMoreInput_); |
no test coverage detected