mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8287904: Reduce runtime of java.net microbenchmarks
Reviewed-by: jvernee
This commit is contained in:
parent
523d553e13
commit
cc445926cf
13 changed files with 58 additions and 379 deletions
|
@ -23,6 +23,8 @@
|
|||
|
||||
package org.openjdk.bench.java.net;
|
||||
|
||||
import org.openjdk.jmh.annotations.Fork;
|
||||
import org.openjdk.jmh.annotations.Measurement;
|
||||
import org.openjdk.jmh.annotations.State;
|
||||
import org.openjdk.jmh.annotations.Scope;
|
||||
import org.openjdk.jmh.annotations.Benchmark;
|
||||
|
@ -30,6 +32,8 @@ import org.openjdk.jmh.annotations.CompilerControl;
|
|||
import org.openjdk.jmh.annotations.BenchmarkMode;
|
||||
import org.openjdk.jmh.annotations.Mode;
|
||||
import org.openjdk.jmh.annotations.OutputTimeUnit;
|
||||
import org.openjdk.jmh.annotations.Warmup;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -37,6 +41,9 @@ import java.util.concurrent.TimeUnit;
|
|||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
@State(Scope.Thread)
|
||||
@Warmup(iterations = 5, time = 1)
|
||||
@Measurement(iterations = 5, time = 1)
|
||||
@Fork(value = 3)
|
||||
public class ThreadLocalURI {
|
||||
|
||||
@Benchmark
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue