| 539 | } |
| 540 | |
| 541 | Status ListWorkers(ServerContext*, const EmptyRequest*, |
| 542 | ListWorkersResponse* response) override { |
| 543 | std::lock_guard<std::recursive_mutex> lock(mutex_); |
| 544 | |
| 545 | for (int wid = 0; wid < Worker::kMaxWorkers; wid++) { |
| 546 | if (!is_worker_active(wid)) |
| 547 | continue; |
| 548 | ListWorkersResponse_WorkerStatus* status = response->add_workers_status(); |
| 549 | status->set_wid(wid); |
| 550 | status->set_running(is_worker_running(wid)); |
| 551 | status->set_core(workers[wid]->core()); |
| 552 | status->set_num_tcs(workers[wid]->scheduler()->NumTcs()); |
| 553 | status->set_silent_drops(workers[wid]->silent_drops()); |
| 554 | } |
| 555 | return Status::OK; |
| 556 | } |
| 557 | |
| 558 | Status AddWorker(ServerContext*, const AddWorkerRequest* request, |
| 559 | EmptyResponse* response) override { |
nothing calls this directly
no test coverage detected