Skip to content

Commit

Permalink
cli - more diag info about thread pool
Browse files Browse the repository at this point in the history
  • Loading branch information
astibal committed Jun 28, 2024
1 parent 4dcd590 commit e45a506
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/service/cmd/diag/diag_cmds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2241,8 +2241,16 @@ int cli_diag_worker_pool_list(struct cli_def *cli, const char *command, char *ar
auto tr = ThreadPool::instance::get().tasks_running();
auto wc = ThreadPool::instance::get().worker_count();

auto uex = ThreadPool::instance::get().stats().unk_except.load();
auto sex = ThreadPool::instance::get().stats().std_except.load();

auto active = ThreadPool::instance::get().is_active();

ss << "Utility thread pool stats: \n";
ss << " enqueued tasks: " << ts << ", active workers: " << tr << "/" << wc << "\n";
ss << " standard exceptions: " << sex << ", unknown exceptions: " << uex << "\n";
ss << "\n";
ss << " is active: " << active << "\n";

cli_print(cli, "%s", ss.str().c_str());

Expand Down

0 comments on commit e45a506

Please sign in to comment.