blob: 0a7a2b63ad265c35dc5b630b7e7c011052b5c8c0 [file] [log] [blame]
package org.eclipse.team.tests.ccvs.ui.logformatter;
/*
* (c) Copyright IBM Corp. 2000, 2002.
* All Rights Reserved.
*/
import java.io.File;
public class PrintAverageMain {
public static void main(String[] args) {
if (args.length != 1) {
System.err.println("Usage: java PrintAverageMain <log>");
return;
}
File file = new File(args[0]);
try {
// read and merge the log
RootEntry root = LogEntry.readLog(file);
MergeRunsVisitor mergeVisitor = new MergeRunsVisitor(null);
root.accept(mergeVisitor);
root = mergeVisitor.getMergedRoot();
// print the log summary
root.accept(new PrintSummaryVisitor(System.out));
} catch (Exception e) {
System.err.println("An error occurred while parsing: " + file);
e.printStackTrace();
return;
}
}
}