summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKenny Gorman <kgorman@shutterfly.com>2010-06-04 01:15:11 +0800
committerEliot <eliot@10gen.com>2010-06-04 02:23:20 +0800
commit79e9558062a2f17caafa7092bf0fd3df7f7520c4 (patch)
tree4b0d49bfd9d39e9024af7d4e58e72e63723c11dd /tools
parent4cd8bf8291b0c6a195a62248cbf8715d72f29934 (diff)
downloadmongo-79e9558062a2f17caafa7092bf0fd3df7f7520c4.tar.gz
added flushes/s parameter.
Diffstat (limited to 'tools')
-rw-r--r--tools/stat.cpp10
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() );