| commit | ef5f5a9a655e25af8b39f61e41895eceaef5144b | [log] [tgz] |
|---|---|---|
| author | Christoffer Adamsen <christofferqa@google.com> | Tue Sep 03 14:09:01 2024 +0200 |
| committer | Christoffer Adamsen <christofferqa@google.com> | Tue Sep 03 14:09:01 2024 +0200 |
| tree | 23e3148ae6013ae901724227894da90dbe8c6b30 | |
| parent | f05505b45d032c8b9cfd143f28a7deb6748eecf1 [diff] |
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,