1 19 package gnu.trove.benchmark; 20 21 import java.io.*; 22 23 class TextReporter implements Reporter { 24 PrintWriter out; 25 26 TextReporter() { 27 this(new PrintWriter(new OutputStreamWriter(System.out),true)); 28 } 29 30 TextReporter(PrintWriter out) { 31 this.out = out; 32 } 33 34 public void report(Result result) { 35 out.print(result); 36 out.println("--------------------------------"); 37 } 38 39 public void start() { 40 out.println("--------------------------------"); 41 out.println("GNU Trove Benchmark suite"); 42 out.println("--------------------------------"); 43 for (int i = 0; i < ENV_PROPS.length; i++) { 44 String key = ENV_PROPS[i]; 45 out.println(key + "=" + System.getProperty(key)); 46 } 47 out.println("--------------------------------"); 48 } 49 50 public void finish() { 51 out.println("done"); 52 } 53 } 54 | Popular Tags |