#At file:///home/jonas/src/telco-7.0/ based on revid:jonas@stripped
4121 Jonas Oreland 2011-01-17
ndb - add printouts for rebuild duration
modified:
storage/ndb/tools/restore/consumer_restore.cpp
=== modified file 'storage/ndb/tools/restore/consumer_restore.cpp'
--- a/storage/ndb/tools/restore/consumer_restore.cpp 2010-12-03 09:36:45 +0000
+++ b/storage/ndb/tools/restore/consumer_restore.cpp 2011-01-17 13:17:32 +0000
@@ -21,6 +21,7 @@
#include <kernel/ndb_limits.h>
#include <my_sys.h>
#include <NdbSleep.h>
+#include <NdbTick.h>
#include <ndb_internal.hpp>
#include <ndb_logevent.h>
@@ -362,6 +363,7 @@ BackupRestore::rebuild_indexes(const Tab
for(size_t i = 0; i<indexes.size(); i++)
{
NdbDictionary::Index * idx = indexes[i];
+ Uint64 start = NdbTick_CurrentMillisecond();
info << "Rebuilding index " << idx->getName() << " on table "
<< tab->getName() << " ..." << flush;
if (dict->createIndex(* idx, 1) != 0)
@@ -373,7 +375,8 @@ BackupRestore::rebuild_indexes(const Tab
return false;
}
- info << "OK" << endl;
+ Uint64 stop = NdbTick_CurrentMillisecond();
+ info << "OK (" << ((stop - start)/1000) << "s)" <<endl;
}
return true;
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20110117131732-q2s3uv0xns2vufdu.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (jonas:4121) | Jonas Oreland | 17 Jan |