0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

Merge branch 'master' of git.10gen.com:/data/gitroot/p

This commit is contained in:
Dwight 2009-02-09 17:18:00 -05:00
commit a9136628d5
2 changed files with 3 additions and 5 deletions

View File

@ -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';

View File

@ -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;