Mercurial > hg > gc-bench
changeset 15:15c589c2251f
UX improvements: data alignment, and print FAILED when datapoint is not present.
author | shade |
---|---|
date | Tue, 29 Nov 2016 11:42:31 +0100 |
parents | c9b74dba39ef |
children | 494232ec77d8 |
files | src/main/java/org/openjdk/gcbench/GCBench.java src/main/java/org/openjdk/gcbench/tests/DimensionalTest.java src/main/java/org/openjdk/gcbench/tests/Sequence.java |
diffstat | 3 files changed, 24 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/org/openjdk/gcbench/GCBench.java Mon Nov 28 21:42:40 2016 +0100 +++ b/src/main/java/org/openjdk/gcbench/GCBench.java Tue Nov 29 11:42:31 2016 +0100 @@ -96,6 +96,7 @@ .addProfiler(GCProfiler.class) .addProfiler(SafepointsProfiler.class) .verbosity(VerboseMode.SILENT) + .shouldFailOnError(true) .build(); switch (set.valueOf(optMode)) {
--- a/src/main/java/org/openjdk/gcbench/tests/DimensionalTest.java Mon Nov 28 21:42:40 2016 +0100 +++ b/src/main/java/org/openjdk/gcbench/tests/DimensionalTest.java Tue Nov 29 11:42:31 2016 +0100 @@ -49,7 +49,7 @@ pw.printf("%-15s ", "Target rate"); } - pw.printf("%-35s %-25s %-43s %-43s %n", + pw.printf("%-35s %-25s %-53s %-53s %n", "Work rate", "Allocation rate", "Pauses (sum, 99%, 99.9%, 99.99%)", @@ -124,23 +124,23 @@ } private void runWith(DimensionValues values, Options opts, int rate) { + pw.print(" "); + + for (int v : values.values) { + pw.printf("%-10s ", v); + } + + if (rated) { + pw.printf("%-15s ", rate); + } + try { RunResult result = new Runner(opts).runSingle(); Result prim = result.getPrimaryResult(); Map<String, Result> sec = result.getSecondaryResults(); - pw.print(" "); - - for (int v : values.values) { - pw.printf("%-10s ", v); - } - - if (rated) { - pw.printf("%-15s ", rate); - } - - pw.printf("%-35s %-25s %-10s %-10s %-10s %-10s %-10s %-10s %-10s %-10s %n", + pw.printf("%-35s %-25s %12s %12s %12s %12s %12s %12s %12s %12s %n", shortVal(prim), shortVal(sec.get("·gc.alloc.rate")), latencyVal(sec.get("·safepoints.pause")), @@ -153,7 +153,11 @@ latencyVal(sec.get("·safepoints.ttsp.p0.9999")) ); } catch (RunnerException e) { - // do nothing + pw.print("FAILED: "); + for (Throwable t : e.getCause().getSuppressed()) { + pw.print(t.getMessage() + " "); + } + pw.println(); } }
--- a/src/main/java/org/openjdk/gcbench/tests/Sequence.java Mon Nov 28 21:42:40 2016 +0100 +++ b/src/main/java/org/openjdk/gcbench/tests/Sequence.java Tue Nov 29 11:42:31 2016 +0100 @@ -12,11 +12,14 @@ public static Sequence powersOfTen_Sub(int min, int max) { List<Integer> vs = new ArrayList<>(); for (int v = min; v <= max; v *= 10) { - for (int t = 1; t < 10; t++) { - vs.add(v*t); + for (int t = 1; t <= 5; t++) { + int n = v * t * 2; + if (n <= max) { + vs.add(n); + } } } - return new Sequence("[" + min + ", " + max + "], power-of-ten steps, last step divided in 10 parts", vs); + return new Sequence("[" + min + ", " + max + "], power-of-ten steps, last step divided in 5 parts", vs); } public static Sequence powersOfTen(int min, int max) {