summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-06-11 23:33:42 -0400
committerEliot Horowitz <eliot@10gen.com>2010-06-11 23:33:42 -0400
commit5609a64bf06aefbbdf1ccf19199982d9ced2ad7e (patch)
treefe90624c4d836fbe080f902b3bbfd7957c67c665 /tools
parent1829364b730cfcb1dcefd6bf646126b7e1ce9733 (diff)
downloadmongo-5609a64bf06aefbbdf1ccf19199982d9ced2ad7e.tar.gz
safer faults/s
Diffstat (limited to 'tools')
-rw-r--r--tools/stat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/stat.cpp b/tools/stat.cpp
index b9d99f22d71..1d5afd21a81 100644
--- a/tools/stat.cpp
+++ b/tools/stat.cpp
@@ -169,8 +169,8 @@ namespace mongo {
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 ) );
+ if ( ax["page_faults"].type() || ax["page_faults"].type() )
+ cell( ss , "faults/s" , 6 , (int)diff( "page_faults" , ax , bx ) );
}
cell( ss , "% locked" , 8 , percent( "globalLock.totalTime" , "globalLock.lockTime" , a , b ) );