JMH bug report
Dmitriy Dumanskiy
doom369 at gmail.com
Tue Mar 3 09:51:05 UTC 2020
Sorry, I forgot to attach the benchmark. This is the minimal reproducer:
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.RunnerException;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@BenchmarkMode(Mode.Throughput)
@Fork(1)
@State(Scope.Thread)
@Warmup(iterations = 10, time = 1, batchSize = 1000)
@Measurement(iterations = 10, time = 1, batchSize = 1000)
public class EscaperTest {
@Param({"1\r"})
private String s;
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include(EscaperTest.class.getSimpleName())
.build();
new Runner(opt).run();
}
@Benchmark
public boolean test() {
return true;
}
}
Regards, Dmitriy.
On Tue, Mar 3, 2020 at 11:26 AM Aleksey Shipilev <shade at redhat.com> wrote:
> On 3/2/20 7:04 PM, Aleksey Shipilev wrote:
> > On 2/22/20 8:48 AM, Dmitriy Dumanskiy wrote:
> >> JMH S 48 cc.microbenchmarks.core.arrays.escape.EscapeTest S 80
> >>
> cc.microbenchmarks.core.arrays.escape.generated.EscapeTest_switchEscaper_jmhTest
> >> S 13 switchEscaper S 10 Throughput E A 1 1 1 E I 2 10 T 3 1 s I 4 1000
> I 2
> >> 10 T 3 1 s I 4 1000 I 1 1 E E E E E M 1 1 s 4 1 1 1 \ 2 1
> >
> > Please provide MCVE for this.
>
> On a second look, this look like broken benchmark line.
>
> It garbles near @Param data block, would you mind showing what your
> benchmark has for @Param-s?
>
> --
> Thanks,
> -Aleksey
>
>
More information about the jmh-dev
mailing list