BenchmarkMethodChart not work as expected.

76 views
Skip to first unread message

汤继龙

unread,
Oct 11, 2013, 4:28:14 AM10/11/13
to junit-be...@googlegroups.com
Hi All,

I created one junit benchmark test case like following:

@AxisRange(min = 0, max = 1)
@BenchmarkMethodChart(filePrefix = "benchmark-save")
@BenchmarkHistoryChart(filePrefix ="benchmark-save-history", labelWith = LabelType.RUN_ID, maxRuns = 30)
public class WickBenchSaveTest extends BaseBenchMark{

   @Rule
   public TestRule benchmarkRun = new BenchmarkRule(new WriterConsumer(),new MySQLConsumer("jdbc:MySQL://localhost:3306/test?user=root"));

    @Test
    @BenchmarkOptions(
            benchmarkRounds = 1000,
            warmupRounds = 5,
            clock = Clock.NANO_TIME,
            concurrency = 100)
    public void benchSave() throws Exception {
          //test logic
    }
  
     @Test
    @BenchmarkOptions(
            benchmarkRounds = 1000,
            warmupRounds = 5,
            clock = Clock.NANO_TIME,
            concurrency = 100)
    public void benchUpdate() throws Exception {
          //test logic
    }
}

It do generate the report, but there is only one method stats, the benchUpdate method not display.
Any help will be appreciated. 
Any ideas?






Dawid Weiss

unread,
Oct 11, 2013, 6:19:29 AM10/11/13
to junit-benchmarks

From the top of my head I think you need h2 consumer as well to preserve stats in a local DB. Check if that works.

Dawid


--
You received this message because you are subscribed to the Google Groups "JUnitBenchmarks: Performance Benchmarking for JUnit4" group.
To unsubscribe from this group and stop receiving emails from it, send an email to junit-benchmar...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

汤继龙

unread,
Oct 23, 2013, 3:31:32 AM10/23/13
to junit-be...@googlegroups.com
Thank for your reply, I will try it later.
Reply all
Reply to author
Forward
0 new messages