result.addChildResult(database);
if(logger.isVerbose() && database.getIndexes().size() > 0) {
StringBuffer buf = new StringBuffer();
buf.append("Index statistics before running algorithms:").append(FormatUtil.NEWLINE);
for(Index idx : database.getIndexes()) {
PageFileStatistics stat = idx.getPageFileStatistics();
PageFileUtil.appendPageFileStatistics(buf, stat);
}
logger.verbose(buf.toString());
}
for(Algorithm algorithm : algorithms) {
long start = System.currentTimeMillis();
Result res = algorithm.run(database);
long end = System.currentTimeMillis();
if(logger.isVerbose()) {
long elapsedTime = end - start;
StringBuffer buf = new StringBuffer();
buf.append(algorithm.getClass().getName()).append(" runtime : ");
buf.append(elapsedTime).append(" milliseconds.").append(FormatUtil.NEWLINE);
for(Index idx : database.getIndexes()) {
PageFileStatistics stat = idx.getPageFileStatistics();
PageFileUtil.appendPageFileStatistics(buf, stat);
}
logger.verbose(buf.toString());
}
if(res != null) {