mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
access to progress meter in db.currentOp() SERVER-2167
This commit is contained in:
parent
821f38fb8a
commit
ce83d98bcf
@ -395,6 +395,10 @@ namespace mongo {
|
||||
StringBuilder buf(128);
|
||||
buf << _message.toString() << " " << _progressMeter.toString();
|
||||
b.append( "msg" , buf.str() );
|
||||
BSONObjBuilder sub( b.subobjStart( "progress" ) );
|
||||
sub.appendNumber( "done" , (long long)_progressMeter.done() );
|
||||
sub.appendNumber( "total" , (long long)_progressMeter.total() );
|
||||
sub.done();
|
||||
}
|
||||
else {
|
||||
b.append( "msg" , _message.toString() );
|
||||
|
@ -284,18 +284,16 @@ namespace mongo {
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned long long done() {
|
||||
return _done;
|
||||
}
|
||||
|
||||
unsigned long long hits() {
|
||||
return _hits;
|
||||
}
|
||||
|
||||
void setTotalWhileRunning( unsigned long long total ) {
|
||||
_total = total;
|
||||
}
|
||||
|
||||
unsigned long long done() const { return _done; }
|
||||
|
||||
unsigned long long hits() const { return _hits; }
|
||||
|
||||
unsigned long long total() const { return _total; }
|
||||
|
||||
string toString() const {
|
||||
if ( ! _active )
|
||||
return "";
|
||||
|
Loading…
Reference in New Issue
Block a user