/** * Main method for invoking benchs with classes as strings. * * @param args * the classes * @throws ClassNotFoundException * if class cannot be found * @throws IllegalAccessException * if conf cannot be instantiated * @throws InstantiationException * if conf cannot be instantiated */ public static void main(final String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { final BenchmarkResult res = runBenchs(args); new TabularSummaryOutput().visitBenchmark(res); } }
/** * This method starts the bench progress with the registered classes. * * @throws SocketViewException */ public boolean runBenchmark() throws SocketViewException { final BenchmarkResult res = benchmark.run(); new TabularSummaryOutput().visitBenchmark(res); view.finished(); return true; }
/** * Test method for * {@link org.perfidix.ouput.TabularSummaryOutput#listenToException(org.perfidix.exceptions.AbstractPerfidixMethodException)} * . */ @Test public final void testListenToException() { final TabularSummaryOutput output = new TabularSummaryOutput(); output.listenToException(testException); final StringBuilder builder = new StringBuilder(); builder.append("Class: Class1#method1\n"); builder.append("Annotation: Bench\n"); builder.append("Exception: PerfidixMethodInvocationException/java.io.IOException\n"); builder.append("java.io.IOException\n"); assertTrue("Exception listener test", bytes.toString().startsWith(builder.toString())); }
final TabularSummaryOutput output = new TabularSummaryOutput(); output.visitBenchmark(benchRes); final StringBuilder builder = new StringBuilder();
/** * Simple setUp of a benchmark. The {@link Benchmark} is initialized with * two Meters (<code>TimeMeter</code> and <code>MemMeter</code>). Afterwards * the benchmark is running with a TabularOutput as a listener registered. * The result of the benchmark is displayed in a complete table at the end. * * @param args * not used here */ public static void main(String[] args) { final Benchmark bench = new Benchmark(new Config()); bench.add(ListBenchmark.class); final BenchmarkResult res = bench.run(); new TabularSummaryOutput().visitBenchmark(res); }
/** * Simple setUp of a benchmark. The {@link Benchmark} is initialized with * two Meters (<code>TimeMeter</code> and <code>MemMeter</code>). Afterwards * the benchmark is running with a TabularOutput as a listener registered. * The result of the benchmark is displayed in a complete table at the end. * * @param args * not used here */ public static void main(final String[] args) { final Benchmark bench = new Benchmark(new Config()); bench.add(StackBenchmark.class); final BenchmarkResult res = bench.run(); new TabularSummaryOutput().visitBenchmark(res); }
benchRes.getIncludedResults().iterator().next().getIncludedResults().iterator().next(); final AbstractMeter meter = methRes.getRegisteredMeters().iterator().next(); final TabularSummaryOutput output = new TabularSummaryOutput(); for (final double d : methRes.getResultSet(meter)) { output.listenToResultSet((Method)methRes.getRelatedElement(), meter, d);
public static void main (String[] args) { Benchmark benchmark = new Benchmark(); benchmark.add(StorageBench.class); BenchmarkResult res = benchmark.run(); TabularSummaryOutput tab = new TabularSummaryOutput(); tab.visitBenchmark(res); }