summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/tool.cpp20
-rw-r--r--tools/tool.h23
2 files changed, 0 insertions, 43 deletions
diff --git a/tools/tool.cpp b/tools/tool.cpp
index bf2d6158d2a..8aa1cfaac98 100644
--- a/tools/tool.cpp
+++ b/tools/tool.cpp
@@ -13,26 +13,6 @@ using namespace mongo;
namespace po = boost::program_options;
-mongo::ProgressMeter::ProgressMeter( long long total , int secondsBetween )
- : _total( total ) , _secondsBetween( secondsBetween ) , _done(0) , _hits(0) , _lastTime( time(0) ){
-
-}
-
-void mongo::ProgressMeter::hit( int n ){
- _done += n;
- _hits++;
- if ( _hits % 100 )
- return;
-
- int t = time(0);
- if ( t - _lastTime < _secondsBetween )
- return;
-
- int per = (int)( ( (double)_done * 100.0 ) / (double)_total );
- cout << "\t\t" << _done << "/" << _total << "\t" << per << "%" << endl;
- _lastTime = t;
-}
-
mongo::Tool::Tool( string name , string defaultDB , string defaultCollection ) :
_name( name ) , _db( defaultDB ) , _coll( defaultCollection ) , _conn(0), _paired(false) {
diff --git a/tools/tool.h b/tools/tool.h
index b7fec8ec44c..a398ed5a6d8 100644
--- a/tools/tool.h
+++ b/tools/tool.h
@@ -84,27 +84,4 @@ namespace mongo {
};
- class ProgressMeter {
- public:
- ProgressMeter( long long total , int secondsBetween = 3 );
-
- void hit( int n = 1 );
-
- long long done(){
- return _done;
- }
-
- long long hits(){
- return _hits;
- }
-
- private:
-
- long long _total;
- int _secondsBetween;
-
- long long _done;
- long long _hits;
- int _lastTime;
- };
}