JMH Setting Inquiry

Viewed 40

I would like to proceed with the performance test using JMH. If 5000 users are going to perform performance verification that repeats 100 actions, is it correct to set the annotation option as follows?

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Fork(value = 1, jvmArgs = {"-Xms8G", "-Xmx8G"})
@Threads(value = 5000)
@Warmup(iterations = 0)
@Measurement(iterations = 100, time = 3, timeUnit = TimeUnit.SECONDS)    
public class Test {
    public static void main(String[] args) throws Exception {
        Options option = new OptionsBuilder()
                 .include(AlgorandTest.class.getSimpleName())
                 .resultFormat(ResultFormatType.CSV)
                 .build();

         new Runner(option).run(); // start benchmarking
     }
     @BenchMark
     public void A() {
         ....
     }
}

Please help. Thank you.

0 Answers
Related