summaryrefslogtreecommitdiff
path: root/tools/stat.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-07-12 13:06:16 -0400
committerEliot Horowitz <eliot@10gen.com>2010-07-12 13:06:16 -0400
commit275fb3f0567e7d4b1b05b5002fdf33d12f6098e2 (patch)
tree49fd196e351aeb2319303e15856465947626003b /tools/stat.cpp
parent1e15c43038da0cf0faef75ee9377e5d3c58e4509 (diff)
downloadmongo-275fb3f0567e7d4b1b05b5002fdf33d12f6098e2.tar.gz
mongostat has queue length
Diffstat (limited to 'tools/stat.cpp')
-rw-r--r--tools/stat.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/stat.cpp b/tools/stat.cpp
index 1d5afd21a81..dc1f14c679e 100644
--- a/tools/stat.cpp
+++ b/tools/stat.cpp
@@ -176,6 +176,13 @@ namespace mongo {
cell( ss , "% locked" , 8 , percent( "globalLock.totalTime" , "globalLock.lockTime" , a , b ) );
cell( ss , "% idx miss" , 8 , percent( "indexCounters.btree.accesses" , "indexCounters.btree.misses" , a , b ) );
+ if ( b.getFieldDotted( "globalLock.currentQueue" ).type() == Object ){
+ int r = b.getFieldDotted( "globalLock.currentQueue.readers" ).numberInt();
+ int w = b.getFieldDotted( "globalLock.currentQueue.writers" ).numberInt();
+ stringstream temp;
+ temp << r+w << "|" << r << "|" << w;
+ cell( ss , "q t|r|w" , 9 , temp.str() );
+ }
cell( ss , "conn" , 5 , b.getFieldDotted( "connections.current" ).numberInt() );
{