MCPcopy Create free account
hub / github.com/NetSys/bess / ListWorkers

Method ListWorkers

core/bessctl.cc:541–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 7

is_worker_activeFunction · 0.85
is_worker_runningFunction · 0.85
coreMethod · 0.80
NumTcsMethod · 0.80
schedulerMethod · 0.80
set_silent_dropsMethod · 0.80
silent_dropsMethod · 0.80

Tested by

no test coverage detected