Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0a7a2b63ad265c35dc5b630b7e7c011052b5c8c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
		}
	}
}

Back to the top