summaryrefslogtreecommitdiff
path: root/src/mongo/s/s_only.cpp
diff options
context:
space:
mode:
authordaveh86 <howsdav@gmail.com>2014-08-07 14:53:10 +1000
committerBenety Goh <benety@mongodb.com>2014-09-24 22:51:58 -0400
commitb2ea63e14f6e382c42409c8bf6326115fca94888 (patch)
tree711855b889ac5994495ac78597e77c5f2275e8c6 /src/mongo/s/s_only.cpp
parent09fd21a206f959f6742e92d38b783a3e04e1948b (diff)
downloadmongo-b2ea63e14f6e382c42409c8bf6326115fca94888.tar.gz
SERVER-7382 command counters
Closes #794 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'src/mongo/s/s_only.cpp')
-rw-r--r--src/mongo/s/s_only.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/s/s_only.cpp b/src/mongo/s/s_only.cpp
index 3db331d2dbf..9c17e2d2d8c 100644
--- a/src/mongo/s/s_only.cpp
+++ b/src/mongo/s/s_only.cpp
@@ -137,6 +137,8 @@ namespace mongo {
return;
}
+ c->_commandsExecuted.increment();
+
std::string errmsg;
bool ok;
try {
@@ -155,6 +157,10 @@ namespace mongo {
result.append( "code" , code );
}
+ if ( !ok ) {
+ c->_commandsFailed.increment();
+ }
+
appendCommandStatus(result, ok, errmsg);
}
}