Ejemplo n.º 1
0
 void ClientCursor::appendStats( BSONObjBuilder& result ) {
     recursive_scoped_lock lock(ccmutex);
     result.appendNumber("totalOpen", clientCursorsById.size() );
     result.appendNumber("clientCursors_size", (int) numCursors());
     result.appendNumber("timedOut" , numberTimedOut);
     unsigned pinned = 0;
     unsigned notimeout = 0;
     for ( CCById::iterator i = clientCursorsById.begin(); i != clientCursorsById.end(); i++ ) {
         unsigned p = i->second->_pinValue;
         if( p >= 100 )
             pinned++;
         else if( p > 0 )
             notimeout++;
     }
     if( pinned ) 
         result.append("pinned", pinned);
     if( notimeout )
         result.append("totalNoTimeout", notimeout);
 }
Ejemplo n.º 2
0
 void ClientCursor::appendStats( BSONObjBuilder& result ) {
     recursive_scoped_lock lock(ccmutex);
     result.appendNumber("totalOpen", clientCursorsById.size() );
     result.appendNumber("clientCursors_size", (int) numCursors());
     result.appendNumber("timedOut" , numberTimedOut);
 }