summaryrefslogtreecommitdiff
path: root/src/mongo/util/progress_meter.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2013-07-30 11:15:31 -0400
committerRandolph Tan <randolph@10gen.com>2013-07-30 11:37:36 -0400
commit0bc4c30550668d547889b80af209f7623e72a1a9 (patch)
tree3143da4a85d7f749568fa7956407b2d63c785096 /src/mongo/util/progress_meter.cpp
parent47fbdb86773189df3c1b3b0dde838cf07a11d8f3 (diff)
downloadmongo-0bc4c30550668d547889b80af209f7623e72a1a9.tar.gz
SERVER-9907 Allow to skip initial count() in mapreduce
Added option to hide the total in the progress meter.
Diffstat (limited to 'src/mongo/util/progress_meter.cpp')
-rw-r--r--src/mongo/util/progress_meter.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/util/progress_meter.cpp b/src/mongo/util/progress_meter.cpp
index 6d2b2c7e7f5..e9cbbacaa8f 100644
--- a/src/mongo/util/progress_meter.cpp
+++ b/src/mongo/util/progress_meter.cpp
@@ -56,7 +56,12 @@ namespace mongo {
if ( _total > 0 ) {
int per = (int)( ( (double)_done * 100.0 ) / (double)_total );
LogstreamBuilder out = log();
- out << "\t\t" << _name << ": " << _done << '/' << _total << '\t' << per << '%';
+ out << "\t\t" << _name << ": " << _done;
+
+ if (_showTotal) {
+ out << '/' << _total << '\t' << per << '%';
+ }
+
if ( ! _units.empty() ) {
out << "\t(" << _units << ")";
}