diff options
author | Kenny Gorman <kgorman@shutterfly.com> | 2010-06-04 01:15:11 +0800 |
---|---|---|
committer | Eliot <eliot@10gen.com> | 2010-06-04 02:23:20 +0800 |
commit | 79e9558062a2f17caafa7092bf0fd3df7f7520c4 (patch) | |
tree | 4b0d49bfd9d39e9024af7d4e58e72e63723c11dd /tools | |
parent | 4cd8bf8291b0c6a195a62248cbf8715d72f29934 (diff) | |
download | mongo-79e9558062a2f17caafa7092bf0fd3df7f7520c4.tar.gz |
added flushes/s parameter.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/stat.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/stat.cpp b/tools/stat.cpp index f72d61e99aa..64f2c2f48b2 100644 --- a/tools/stat.cpp +++ b/tools/stat.cpp @@ -136,7 +136,6 @@ namespace mongo { ss << setw(width) << val << " "; } - string doRow( const BSONObj& a , const BSONObj& b ){ stringstream ss; @@ -150,7 +149,14 @@ namespace mongo { } } - if ( b.getFieldDotted("mem.supported").trueValue() ){ + if ( b["backgroundFlushing"].type() == Object ){ + BSONObj ax = a["backgroundFlushing"].embeddedObject(); + BSONObj bx = b["backgroundFlushing"].embeddedObject(); + BSONObjIterator i( bx ); + cell( ss , "flushes/s" , 6 , (int)diff( "flushes" , ax , bx ) ); + } + + if ( b.getFieldDotted("mem.supported").trueValue() ){ BSONObj bx = b["mem"].embeddedObject(); BSONObjIterator i( bx ); cell( ss , "mapped" , 6 , bx["mapped"].numberInt() ); |