Add ability to compile and run tests locally & update to Java7 + GWT 2.7

Change-Id: I1f8918409b288680274dcef246916fc1005d64c0
diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml
index 4bac6c2..766055f 100644
--- a/benchmarks/pom.xml
+++ b/benchmarks/pom.xml
@@ -19,7 +19,7 @@
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <!-- Using an older version of GWT here allows the benchmarks to execute against old      -->
     <!-- versions of the GWT SDK. This will help to find old commits that changed performance -->
-    <gwtversion>2.0.0</gwtversion>
+    <gwtversion>2.7.0</gwtversion>
   </properties>
 
   <dependencies>
@@ -40,6 +40,11 @@
       <version>4.11</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+      </dependency>
   </dependencies>
 
   <build>
@@ -74,10 +79,8 @@
         <version>2.5.1</version>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <!-- enforcing java 1.5 so we can make sure benchmarks can be -->
-          <!-- compiled with old GWT versions -->
-          <source>1.5</source>
-          <target>1.5</target>
+          <source>1.7</source>
+          <target>1.7</target>
         </configuration>
       </plugin>
 
@@ -113,7 +116,7 @@
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>gwt-maven-plugin</artifactId>
-        <version>2.1.0</version>
+        <version>${gwtversion}</version>
         <executions>
           <execution>
             <goals>
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/navierstokes/gwt/NavierStokes.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/navierstokes/gwt/NavierStokes.java
index 655ce9d..a406fd4 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/navierstokes/gwt/NavierStokes.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/navierstokes/gwt/NavierStokes.java
@@ -74,6 +74,7 @@
   int framesTillAddingPoints = 0;
   int framesBetweenAddingPoints = 5;
 
+  @Override
   public void prepareFrame(Field field) {
     if (framesTillAddingPoints == 0) {
       addPoints(field);
@@ -84,6 +85,7 @@
     }
   }
 
+  @Override
   public void call(Field f) {
 
   }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/DeviceTask.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/DeviceTask.java
index 5f3a6de..4de15a3 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/DeviceTask.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/DeviceTask.java
@@ -31,6 +31,7 @@
     this.v1 = null;
   }
 
+  @Override
   public TaskControlBlock run(Packet packet) {
     if (packet == null) {
       if (this.v1 == null) return this.scheduler.suspendCurrent();
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/HandlerTask.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/HandlerTask.java
index 037ef93..18a9909 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/HandlerTask.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/HandlerTask.java
@@ -33,6 +33,7 @@
     this.v2 = null;
   }
 
+  @Override
   public TaskControlBlock run(Packet packet) {
     if (packet != null) {
       if (packet.kind == Scheduler.KIND_WORK) {
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/IdleTask.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/IdleTask.java
index 888d56d..a285d64 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/IdleTask.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/IdleTask.java
@@ -35,6 +35,7 @@
     this.count = count;
   }
 
+  @Override
   public TaskControlBlock run(Packet packet) {
     this.count--;
     if (this.count == 0) return this.scheduler.holdCurrent();
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/TaskControlBlock.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/TaskControlBlock.java
index f86bd23..3ef4a48 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/TaskControlBlock.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/TaskControlBlock.java
@@ -141,6 +141,7 @@
     return "tcb { " + this.task + "@" + this.state + " }";
   }
 
+  @Override
   public TaskControlBlock run(Packet packet) {
     return run();
   }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/WorkerTask.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/WorkerTask.java
index a5e5efb..288486e 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/WorkerTask.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/richards/gwt/WorkerTask.java
@@ -34,6 +34,7 @@
     this.v2 = v2;
   }
 
+  @Override
   public TaskControlBlock run(Packet packet) {
     if (packet == null) {
       return this.scheduler.suspendCurrent();
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/splay/gwt/SplayTree.java b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/splay/gwt/SplayTree.java
index 80ab4f7..5ffb1f4 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/splay/gwt/SplayTree.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/benchmarks/octane/client/splay/gwt/SplayTree.java
@@ -202,6 +202,7 @@
     final JavaScriptArrayNumber result = CollectionFactory.createNumber();
     if (!this.isEmpty()) {
       this.root_.traverse_(new Visitor() {
+        @Override
         public void call(Node n) {
           result.push(n.key);
         }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayBooleanGwtImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayBooleanGwtImpl.java
index 6146baf..70caff6 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayBooleanGwtImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayBooleanGwtImpl.java
@@ -40,18 +40,22 @@
     return new Array(initialCapacity);
   }-*/;
 
+  @Override
   public native boolean get(int i) /*-{
     return this[i];
   }-*/;
 
+  @Override
   public native int length() /*-{
     return this.length;
   }-*/;
 
+  @Override
   public native void push(boolean t) /*-{
     return this.push(t);
   }-*/;
 
+  @Override
   public native void set(int index, boolean value) /*-{
     this[index] = value;
   }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayGwtImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayGwtImpl.java
index ff6d016..0f8469f 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayGwtImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayGwtImpl.java
@@ -40,18 +40,22 @@
     return new Array(initialCapacity);
   }-*/;
 
+  @Override
   public native T get(int i) /*-{
     return this[i];
   }-*/;
 
+  @Override
   public native int length() /*-{
     return this.length;
   }-*/;
 
+  @Override
   public native void push(T t) /*-{
     return this.push(t);
   }-*/;
 
+  @Override
   public native void set(int index, T value) /*-{
     this[index] = value;
   }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayIntGwtImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayIntGwtImpl.java
index 80787bc..5ee4425 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayIntGwtImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayIntGwtImpl.java
@@ -40,18 +40,22 @@
     return new Array(initialCapacity);
   }-*/;
 
+  @Override
   public native int get(int i) /*-{
     return this[i];
   }-*/;
 
+  @Override
   public native int length() /*-{
     return this.length;
   }-*/;
 
+  @Override
   public native void push(int t) /*-{
     return this.push(t);
   }-*/;
 
+  @Override
   public native void set(int index, int value) /*-{
     this[index] = value;
   }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayNumberGwtImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayNumberGwtImpl.java
index cd752c1..7b90406 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayNumberGwtImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/client/JavaScriptArrayNumberGwtImpl.java
@@ -40,18 +40,22 @@
     return new Array(initialCapacity);
   }-*/;
 
+  @Override
   public native double get(int i) /*-{
     return this[i];
   }-*/;
 
+  @Override
   public native int length() /*-{
     return this.length;
   }-*/;
 
+  @Override
   public native void push(double t) /*-{
     return this.push(t);
   }-*/;
 
+  @Override
   public native void set(int index, double value) /*-{
     this[index] = value;
   }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayBooleanJavaImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayBooleanJavaImpl.java
index 0b05f85..e52b662 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayBooleanJavaImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayBooleanJavaImpl.java
@@ -33,14 +33,17 @@
     array = new boolean[capacity];
   }
 
+  @Override
   public boolean get(int i) {
     return array[i];
   }
 
+  @Override
   public int length() {
     return length;
   }
 
+  @Override
   public void push(boolean t) {
     if(length > array.length) {
       boolean[] newArray = new boolean[array.length * 2];
@@ -52,6 +55,7 @@
     length++;
   }
 
+  @Override
   public void set(int index, boolean value) {
     // This does not handle out of bounds access currently.
     // No benchmark has run into trouble so far.
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayIntJavaImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayIntJavaImpl.java
index 0b68df2..4ea9a43 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayIntJavaImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayIntJavaImpl.java
@@ -41,14 +41,17 @@
     array = new int[initialCapacity];
   }
 
+  @Override
   public int get(int i) {
     return array[i];
   }
 
+  @Override
   public int length() {
     return length;
   }
 
+  @Override
   public void push(int t) {
     if (length >= array.length) {
       int[] newArray = new int[array.length * 2];
@@ -60,6 +63,7 @@
     length++;
   }
 
+  @Override
   public void set(int index, int value) {
     // This does not handle out of bounds access currently.
     // No benchmark has run into trouble so far.
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayJavaImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayJavaImpl.java
index dfb1fd8..3589fc5 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayJavaImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayJavaImpl.java
@@ -43,18 +43,22 @@
     list = new ArrayList<T>(initialCapacity);
   }
 
+  @Override
   public T get(int i) {
     return list.get(i);
   }
 
+  @Override
   public int length() {
     return list.size();
   }
 
+  @Override
   public void push(T t) {
     list.add(t);
   }
 
+  @Override
   public void set(int index, T value) {
     // This does not handle out of bounds access currently.
     // No benchmark has run into trouble so far.
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayNumberJavaImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayNumberJavaImpl.java
index 4919d50..5d34961 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayNumberJavaImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/collection/shared/impl/JavaScriptArrayNumberJavaImpl.java
@@ -41,14 +41,17 @@
     array = new double[initialCapacity];
   }
 
+  @Override
   public double get(int i) {
     return array[i];
   }
 
+  @Override
   public int length() {
     return length;
   }
 
+  @Override
   public void push(double t) {
     if (length >= array.length) {
       double[] newArray = new double[array.length * 2];
@@ -60,6 +63,7 @@
     length++;
   }
 
+  @Override
   public void set(int index, double value) {
     // This does not handle out of bounds access currently.
     // No benchmark has run into trouble so far.
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/AbstractBenchmarkEntryPoint.java b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/AbstractBenchmarkEntryPoint.java
index 67d1894..4a168c0 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/AbstractBenchmarkEntryPoint.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/AbstractBenchmarkEntryPoint.java
@@ -28,6 +28,7 @@
  */
 public abstract class AbstractBenchmarkEntryPoint implements EntryPoint {
 
+  @Override
   public void onModuleLoad() {
     try {
       maybePatchPerformanceNow();
@@ -37,8 +38,16 @@
       double runsPerSecond =
           (benchmarkResult.getNumberOfRuns() * 1000) / benchmarkResult.getTotalTimePassedMs();
       update(runsPerSecond);
+      if (hasDom()) {
+        display("Result: " + runsPerSecond + " runs/second (Total runs: "
+            + benchmarkResult.getNumberOfRuns() + ", time: "
+            + benchmarkResult.getTotalTimePassedMs() + "ms)");
+      }
     } catch (Exception e) {
       setFailed();
+      if (hasDom()) {
+        display("Failed, see console!");
+      }
       GWT.log("Benchmark failed", e);
     }
   }
@@ -77,4 +86,19 @@
     $wnd.__gwt__benchmarking__failed = true;
     $wnd.__gwt__benchmarking__ran = true;
   }-*/;
+
+  /**
+   * Returns whether the current environment the code is executed in has a DOM.
+   */
+  private native boolean hasDom() /*-{
+    return !!($doc.createElement && $doc.createElement('div'))
+  }-*/;
+
+  private native void display(String s) /*-{
+    // This is intentionally not using GWT's DOM API since we do not want the
+    // framework to drag in extra dependencies.
+    var div = $doc.createElement('div');
+    div.textContent = s;
+    $doc.body.appendChild(div);
+  }-*/;
 }
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/BenchmarkResultJsImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/BenchmarkResultJsImpl.java
index cf9353d..dd63240 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/BenchmarkResultJsImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/client/BenchmarkResultJsImpl.java
@@ -30,35 +30,43 @@
     return {name: "", numberOfRuns: 0, totalTimePassedMs: 0, timesForIndividualRunsMs: []};
   }-*/;
 
+  @Override
   public native String getName() /*-{
     return this.name;
   }-*/;
 
+  @Override
   public native int getNumberOfRuns() /*-{
     return this.numberOfRuns;
   }-*/;
 
+  @Override
   public native JavaScriptArrayNumber getTimesForIndividualRunsMs() /*-{
     return this.timesForIndividualRunsMs;
   }-*/;
 
+  @Override
   public native double getTotalTimePassedMs() /*-{
     return this.totalTimePassedMs;
   }-*/;
 
+  @Override
   public native void setName(String name) /*-{
     this.name = name;
   }-*/;
 
+  @Override
   public native void setNumberOfRuns(int runs) /*-{
     this.numberOfRuns = runs;
   }-*/;
 
+  @Override
   public native void setTimesForIndividualRunsMs(
       JavaScriptArrayNumber timesForIndividualRunsMs) /*-{
     this.timesForIndividualRunsMs = timesForIndividualRunsMs;
   }-*/;
 
+  @Override
   public native void setTotalTimePassed(double time) /*-{
     this.totalTimePassedMs = time;
   }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/server/BenchmarkCompiler.java b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/server/BenchmarkCompiler.java
new file mode 100644
index 0000000..5bd64a8
--- /dev/null
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/server/BenchmarkCompiler.java
@@ -0,0 +1,130 @@
+package com.google.gwt.benchmark.framework.server;
+
+import org.apache.commons.io.IOUtils;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+
+/**
+ * BenchmarkCompiler compiles a given benchmark and outputs a HTML file to run it.
+ */
+public class BenchmarkCompiler {
+
+  private static final String HTML_TEMPLATE =
+      "<!doctype html>\n" +
+      "<html>\n" +
+      "  <head>\n" +
+      "    <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\n" +
+      "    <script type=\"text/javascript\" src=\"{module_nocache}\"></script>\n" +
+      "  </head>\n" +
+      "  <body>\n" +
+      "  </body>\n" +
+      "</html>\n";
+
+  public static void main(String[] args) {
+    if (args.length == 0) {
+      printUsageAndExit();
+    }
+
+    // last parameter is the (short) module name
+    String modulename = args[args.length - 1];
+    if (!modulename.startsWith("com.google.gwt.benchmark.benchmarks.")) {
+      modulename = "com.google.gwt.benchmark.benchmarks." + modulename;
+    }
+
+    // cut of first argument
+    args = Arrays.copyOfRange(args, 0, args.length - 1);
+
+    String classPath = System.getProperty("java.class.path");
+
+    // This is assumed to be the directory of gwt-benchmark-benchmarks
+    String currentDir = System.getProperty("user.dir");
+    File outputDir = new File(new File(currentDir), "war/");
+    try {
+      compile(modulename, classPath, args, outputDir);
+      File htmlFile = writeHostPage(HTML_TEMPLATE, outputDir, modulename);
+      System.out.println("Successfully compiled " + modulename);
+      System.out.println("You can now open the benchmark in your browser:");
+      System.out.println(htmlFile.toURI().toURL());
+    } catch (CompileException | IOException e) {
+      System.err.println("Failed to compile benchmark");
+      e.printStackTrace();
+      System.exit(-1);
+    }
+  }
+
+  private static void printUsageAndExit() {
+    System.err.println("Usage: BenchmarkCompiler <Any GWT compiler options> <modulename>");
+    System.exit(-1);
+  }
+
+  public static void compile(String moduleName, String classpath, String[] args, File outputDir)
+      throws CompileException {
+
+    StringBuilder builder = new StringBuilder();
+
+    builder.append("java ");
+    builder.append("-Dgwt.persistentunitcache=false ");
+    builder.append("-cp ");
+    builder.append(classpath);
+    builder.append(" ");
+    builder.append("com.google.gwt.dev.Compiler ");
+
+    builder.append("-war ");
+    builder.append(outputDir.getAbsolutePath() + " ");
+
+    // pipe all parameter to the GWT compiler
+    for (String arg : args) {
+      builder.append(arg);
+      builder.append(" ");
+    }
+
+    builder.append(moduleName);
+    compile(builder.toString());
+  }
+
+  private static void compile(String command) throws CompileException {
+    InputStream stream = null;
+    try {
+      Process process = Runtime.getRuntime().exec(command);
+      int exitValue = process.waitFor();
+
+      if (exitValue != 0) {
+        stream = process.getInputStream();
+        String error =
+            "Command returned with " + exitValue + " " + IOUtils.toString(stream, "UTF-8");
+        System.err.println(error);
+        throw new CompileException(error);
+      }
+    } catch (IOException | InterruptedException e) {
+      throw new CompileException("Can not run command");
+    } finally {
+      IOUtils.closeQuietly(stream);
+    }
+  }
+
+  private static File writeHostPage(String moduleTemplate, File outputDir, String moduleName)
+      throws IOException {
+    String tpl =
+        moduleTemplate.replace("{module_nocache}", moduleName + "/" + moduleName + ".nocache.js");
+    FileOutputStream stream = null;
+    try {
+      File htmlFile = new File(outputDir, moduleName + ".html");
+      stream = new FileOutputStream(htmlFile);
+      IOUtils.write(tpl.getBytes("UTF-8"), stream);
+      return htmlFile;
+    } finally {
+      IOUtils.closeQuietly(stream);
+    }
+  }
+
+  private static class CompileException extends Exception {
+    public CompileException(String error) {
+      super(error);
+    }
+  }
+}
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/PerformanceFactory.java b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/PerformanceFactory.java
index f217c22..9839161 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/PerformanceFactory.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/PerformanceFactory.java
@@ -25,12 +25,14 @@
 public final class PerformanceFactory {
 
   private static class PerformanceDefaultImpl implements Performance {
+    @Override
     public double now() {
       return System.currentTimeMillis();
     }
   }
 
   private static class PerformanceWindowPerformanceImpl implements Performance {
+    @Override
     public native double now() /*-{
       return $wnd.performance.now();
     }-*/;
diff --git a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/ui/BenchmarkResultJavaImpl.java b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/ui/BenchmarkResultJavaImpl.java
index 72b3d93..78a0f5a 100644
--- a/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/ui/BenchmarkResultJavaImpl.java
+++ b/benchmarks/src/main/java/com/google/gwt/benchmark/framework/shared/ui/BenchmarkResultJavaImpl.java
@@ -28,34 +28,42 @@
   private JavaScriptArrayNumber timesForIndividualRunsMs;
   private String name;
 
+  @Override
   public String getName() {
     return name;
   }
 
+  @Override
   public int getNumberOfRuns() {
     return numberOfRuns;
   }
 
+  @Override
   public JavaScriptArrayNumber getTimesForIndividualRunsMs() {
     return timesForIndividualRunsMs;
   }
 
+  @Override
   public double getTotalTimePassedMs() {
     return totalTimePassedMs;
   }
 
+  @Override
   public void setName(String name) {
     this.name = name;
   }
 
+  @Override
   public void setNumberOfRuns(int numberOfRuns) {
     this.numberOfRuns = numberOfRuns;
   }
 
+  @Override
   public void setTimesForIndividualRunsMs(JavaScriptArrayNumber timesForIndividualRunsMs) {
     this.timesForIndividualRunsMs = timesForIndividualRunsMs;
   }
 
+  @Override
   public void setTotalTimePassed(double time) {
     this.totalTimePassedMs = time;
   }