MCPcopy Create free account
hub / github.com/bytedance/bolt / startTaskTracking

Method startTaskTracking

bolt/exec/ExecutorTaskScheduler.cpp:417–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417void ExecutorTaskScheduler::startTaskTracking(const std::string& taskId) {
418 auto stageId = extractStageId(taskId);
419 bool newStageId = stageIds_.wlock()->emplace(stageId).second;
420 // start running tasks of a new stage
421 if (newStageId &&
422 (state_ == SchedulerState::kInit ||
423 state_ == SchedulerState::kCompleted)) {
424 state_ = SchedulerState::kSampling;
425 cpuTracker_.updateLastUsage();
426 numTrackingTaskThreshold_ = currentConcurrency_;
427 }
428 VLOG(1) << __FUNCTION__ << ": stageId = " << stageId
429 << ", is newStageId = " << newStageId
430 << ", state_ = " << mapSchedulerStateToString(state_)
431 << ", currentConcurrency_ = " << currentConcurrency_
432 << ", ioThreadPool = "
433 << (ioExecutor_ ? ioExecutor_->numThreads() : 0);
434}
435
436void ExecutorTaskScheduler::ExecutorRuntimeStatsCollector::addRuntimeStats(
437 const SimplifiedTaskStats& stats) {

Callers

nothing calls this directly

Calls 4

extractStageIdFunction · 0.85
updateLastUsageMethod · 0.80
emplaceMethod · 0.45

Tested by

no test coverage detected