summaryrefslogtreecommitdiff
path: root/tools/stat.cpp
diff options
context:
space:
mode:
authorKenny Gorman <kgorman@shutterfly.com>2010-06-08 07:56:03 +0800
committerEliot <eliot@10gen.com>2010-06-12 11:30:52 +0800
commit1829364b730cfcb1dcefd6bf646126b7e1ce9733 (patch)
tree35bdb5ce9ec601a22eb50cafb2db3c3e7c8864d1 /tools/stat.cpp
parent73b20d0b258c9a78494f3b77d9ad72de4f6fc8c4 (diff)
downloadmongo-1829364b730cfcb1dcefd6bf646126b7e1ce9733.tar.gz
added faults/s
Diffstat (limited to 'tools/stat.cpp')
-rw-r--r--tools/stat.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/stat.cpp b/tools/stat.cpp
index b2c5447ad21..b9d99f22d71 100644
--- a/tools/stat.cpp
+++ b/tools/stat.cpp
@@ -151,20 +151,27 @@ namespace mongo {
}
}
- if ( b["backgroundFlushing"].type() == Object ){
+ 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() ){
+ if ( b.getFieldDotted("mem.supported").trueValue() ){
BSONObj bx = b["mem"].embeddedObject();
BSONObjIterator i( bx );
cell( ss , "mapped" , 6 , bx["mapped"].numberInt() );
cell( ss , "vsize" , 6 , bx["virtual"].numberInt() );
cell( ss , "res" , 6 , bx["resident"].numberInt() );
}
+
+ if ( b["extra_info"].type() == Object ){
+ BSONObj ax = a["extra_info"].embeddedObject();
+ BSONObj bx = b["extra_info"].embeddedObject();
+ BSONObjIterator i( bx );
+ cell( ss , "faults/s" , 6 , (int)diff( "page_faults" , ax , bx ) );
+ }
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 ) );