Fix empty output from retrace benchmark

Change-Id: Ib86955e630584f2da3843c7a88c0ebe85dc90549
diff --git a/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingle.java b/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingle.java
index 7553ea8..6a6140a 100644
--- a/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingle.java
+++ b/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingle.java
@@ -242,6 +242,10 @@
     printer.accept(size);
   }
 
+  public int size() {
+    return runtimeResults.size();
+  }
+
   @Override
   public void writeResults(PrintStream out) {
     Gson gson =
diff --git a/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingleAdapter.java b/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingleAdapter.java
index 86cfe62..90a257c 100644
--- a/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingleAdapter.java
+++ b/src/test/java/com/android/tools/r8/benchmarks/BenchmarkResultsSingleAdapter.java
@@ -20,7 +20,7 @@
   public JsonElement serialize(
       BenchmarkResultsSingle result, Type type, JsonSerializationContext jsonSerializationContext) {
     JsonArray resultsArray = new JsonArray();
-    for (int iteration = 0; iteration < result.getCodeSizeResults().size(); iteration++) {
+    for (int iteration = 0; iteration < result.size(); iteration++) {
       JsonObject resultObject = new JsonObject();
       addPropertyIfValueDifferentFromRepresentative(
           resultObject,