diff options
author | Dwight <dmerriman@gmail.com> | 2009-02-09 17:18:00 -0500 |
---|---|---|
committer | Dwight <dmerriman@gmail.com> | 2009-02-09 17:18:00 -0500 |
commit | a9136628d5dd18cb3219f8bb41163d36c5cd09b5 (patch) | |
tree | 4c8927263da2f47c351dd04fd51aa0136607374d | |
parent | 3b5cb47a1fd9250e4adce246f6606647e489bb6c (diff) | |
parent | 8476a12040ac53ad70388d00aabc32a4a1ea21c0 (diff) | |
download | mongo-a9136628d5dd18cb3219f8bb41163d36c5cd09b5.tar.gz |
Merge branch 'master' of git.10gen.com:/data/gitroot/p
-rw-r--r-- | db/clientcursor.cpp | 4 | ||||
-rw-r--r-- | util/top.h | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/db/clientcursor.cpp b/db/clientcursor.cpp index 400c912038e..63a6e4d6fbb 100644 --- a/db/clientcursor.cpp +++ b/db/clientcursor.cpp @@ -186,8 +186,8 @@ namespace mongo { return new CursInspector(); } void fill() { - b.append("byLocation_size", byLoc.size()); - b.append("clientCursors_size", clientCursorsById.size()); + b.append("byLocation_size", unsigned( byLoc.size() ) ); + b.append("clientCursors_size", unsigned( clientCursorsById.size() ) ); /* todo update for new impl: stringstream ss; ss << '\n'; diff --git a/util/top.h b/util/top.h index 308adc26930..8a112816d4f 100644 --- a/util/top.h +++ b/util/top.h @@ -48,17 +48,15 @@ public: multimap< D, string, more > sorted; for( map< string, D >::iterator i = snapshot_.begin(); i != snapshot_.end(); ++i ) sorted.insert( make_pair( i->second, i->first ) ); - set< string > already; for( multimap< D, string, more >::iterator i = sorted.begin(); i != sorted.end(); ++i ) { Usage u; - already.insert( i->second ); u.ns = i->second; u.time = totalUsage_[ u.ns ]; u.pct = snapshotDuration_ != D() ? 100.0 * i->first.ticks() / snapshotDuration_.ticks() : 0; res.push_back( u ); } for( map< string, D >::iterator i = totalUsage_.begin(); i != totalUsage_.end(); ++i ) { - if ( already.count( i->first ) != 0 ) + if ( snapshot_.count( i->first ) != 0 ) continue; Usage u; u.ns = i->first; |