diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-08-10 18:48:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-03 20:34:08 +0000 |
commit | a3fa43c5f48e8e7c723b463c1f3cabd0b84c1ddb (patch) | |
tree | 867f177fbe9f89005376536dd2e2a763f9120300 /src/mongo/db | |
parent | 3626408bad5fdbc53fc5c5b1b9c95467ed64e1a7 (diff) | |
download | mongo-a3fa43c5f48e8e7c723b463c1f3cabd0b84c1ddb.tar.gz |
SERVER-51499 Track service executor statistics more thoroughly
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/commands/server_status_servers.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/mongo/db/commands/server_status_servers.cpp b/src/mongo/db/commands/server_status_servers.cpp index 7ee1dfcba52..82ea2b95f12 100644 --- a/src/mongo/db/commands/server_status_servers.cpp +++ b/src/mongo/db/commands/server_status_servers.cpp @@ -33,6 +33,8 @@ #include "mongo/db/commands/server_status.h" #include "mongo/transport/message_compressor_registry.h" #include "mongo/transport/service_entry_point.h" +#include "mongo/transport/service_executor_fixed.h" +#include "mongo/transport/service_executor_reserved.h" #include "mongo/transport/service_executor_synchronous.h" #include "mongo/util/net/hostname_canonicalization.h" #include "mongo/util/net/socket_utils.h" @@ -78,16 +80,27 @@ public: return true; } - // TODO: need to track connections in server stats (see SERVER-49109) BSONObj generateSection(OperationContext* opCtx, const BSONElement& configElement) const override { BSONObjBuilder b; networkCounter.append(b); appendMessageCompressionStats(&b); - auto executor = transport::ServiceExecutorSynchronous::get(opCtx->getServiceContext()); - if (executor) { - BSONObjBuilder section(b.subobjStart("serviceExecutorTaskStats")); - executor->appendStats(§ion); + + { + BSONObjBuilder section = b.subobjStart("serviceExecutors"); + + auto svcCtx = opCtx->getServiceContext(); + if (auto executor = transport::ServiceExecutorSynchronous::get(svcCtx)) { + executor->appendStats(§ion); + } + + if (auto executor = transport::ServiceExecutorReserved::get(svcCtx)) { + executor->appendStats(§ion); + } + + if (auto executor = transport::ServiceExecutorFixed::get(svcCtx)) { + executor->appendStats(§ion); + } } return b.obj(); |