From b2c1fa4f121fdb6cdffa924b802271d68c3367a3 Mon Sep 17 00:00:00 2001 From: LaMont Nelson Date: Sat, 25 Jul 2020 02:06:01 +0000 Subject: SERVER-49694: fix latency measurement in RSM; change latency measurement for command responses to Microseconds --- src/mongo/s/commands/cluster_multicast_cmd.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/s/commands') diff --git a/src/mongo/s/commands/cluster_multicast_cmd.cpp b/src/mongo/s/commands/cluster_multicast_cmd.cpp index 974da4fc557..d4d283e4b13 100644 --- a/src/mongo/s/commands/cluster_multicast_cmd.cpp +++ b/src/mongo/s/commands/cluster_multicast_cmd.cpp @@ -39,6 +39,7 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/commands/cluster_commands_gen.h" #include "mongo/s/grid.h" +#include "mongo/util/duration.h" namespace mongo { namespace { @@ -132,8 +133,9 @@ public: if (CommandHelpers::appendCommandStatusNoThrow(subbob, response.status)) { subbob.append("data", response.data); - if (response.elapsedMillis) { - subbob.append("elapsedMillis", response.elapsedMillis->count()); + if (response.elapsed) { + subbob.append("elapsedMillis", + durationCount(*response.elapsed)); } } } -- cgit v1.2.1