diff options
author | Aaron <aaron@10gen.com> | 2009-02-09 17:00:13 -0500 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-02-09 17:00:13 -0500 |
commit | 8476a12040ac53ad70388d00aabc32a4a1ea21c0 (patch) | |
tree | 4b09f062982c390302cd570b9fe8de2b8ffc4e5a | |
parent | e0843d7476d8390ac165d86bca826b844a7134ad (diff) | |
download | mongo-8476a12040ac53ad70388d00aabc32a4a1ea21c0.tar.gz |
Cleaner
-rw-r--r-- | util/top.h | 4 |
1 files changed, 1 insertions, 3 deletions
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; |