diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-07-12 13:06:16 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-07-12 13:06:16 -0400 |
commit | 275fb3f0567e7d4b1b05b5002fdf33d12f6098e2 (patch) | |
tree | 49fd196e351aeb2319303e15856465947626003b /tools/stat.cpp | |
parent | 1e15c43038da0cf0faef75ee9377e5d3c58e4509 (diff) | |
download | mongo-275fb3f0567e7d4b1b05b5002fdf33d12f6098e2.tar.gz |
mongostat has queue length
Diffstat (limited to 'tools/stat.cpp')
-rw-r--r-- | tools/stat.cpp | 7 |
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() ); { |