File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
test/micro/org/openjdk/bench/java/net Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 24
24
25
25
import org .openjdk .jmh .annotations .Fork ;
26
26
import org .openjdk .jmh .annotations .Measurement ;
27
+ import org .openjdk .jmh .annotations .Param ;
27
28
import org .openjdk .jmh .annotations .State ;
28
29
import org .openjdk .jmh .annotations .Scope ;
29
30
import org .openjdk .jmh .annotations .Benchmark ;
47
48
@ Fork (value = 3 )
48
49
public class URIAuthorityParsingBenchmark {
49
50
50
- private final String NUMERIC_HOST_URI = "https://98765432101.abc.xyz.com" ;
51
- private final String STANDARD_HOST_URI = "https://xxxxx.abc.xyz.com" ;
51
+ @ Param ({
52
+ "https://98765432101.abc.xyz.com" ,
53
+ "https://ABCDEFGHIJK.abc.xyz.com"
54
+ })
55
+ private String uri ;
52
56
53
57
@ Benchmark
54
- public void createUriWithNumericHostPrefix (Blackhole blackhole ) {
55
- blackhole .consume (URI .create (NUMERIC_HOST_URI ));
58
+ public void create (Blackhole blackhole ) {
59
+ blackhole .consume (URI .create (uri ));
56
60
}
57
61
58
- @ Benchmark
59
- public void createUriWithStandardHost (Blackhole blackhole ) {
60
- blackhole .consume (URI .create (STANDARD_HOST_URI ));
61
- }
62
62
}
You can’t perform that action at this time.
0 commit comments