public static void main ( String [ ] args ) throws RunnerException { for ( String benchmark : benchmarks . keySet ( ) ) { String [ ] parts = benchmark . split ( "-" ) ; Options opt = new OptionsBuilder ( ) . include ( ArrayListBenchmark . class . getSimpleName ( ) ) // Warmup, and then run test iterations . warmupIterations ( 2 ) . measurementIterations ( 5 ) // Each iteration call the test repeatedly for ~60 seconds . mode ( Mode . AverageTime ) . warmupTime ( TimeValue . seconds ( 10 ) ) . measurementTime ( TimeValue . seconds ( 60 ) ) // The size of the list . param ( "size" , "80000000" , "20000000" , "5000000" ) . param ( "list" , parts [ 0 ] ) . param ( "type" , parts [ 1 ] ) . forks ( 1 ) . jvmArgs ( "-Xmx16g" ) //.addProfiler(MemoryProfiler.class) //.addProfiler(StackProfiler.class) //.addProfiler(GCProfiler.class) . build ( ) ; new Runner ( opt ) . run ( ) ; } }
Runs the ArrayListBenchmarks .