mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8288673: Reduce runtime of java.time microbenchmarks
Reviewed-by: jvernee
This commit is contained in:
parent
d917e1874e
commit
68bff04515
3 changed files with 7 additions and 7 deletions
|
@ -55,8 +55,8 @@ import org.openjdk.jmh.infra.Blackhole;
|
||||||
*/
|
*/
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||||
@Warmup(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 5, time = 1)
|
||||||
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 5, time = 1)
|
||||||
@Fork(3)
|
@Fork(3)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
public class GetYearBench {
|
public class GetYearBench {
|
||||||
|
|
|
@ -47,8 +47,8 @@ import org.openjdk.jmh.annotations.Warmup;
|
||||||
*/
|
*/
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.MICROSECONDS)
|
@OutputTimeUnit(TimeUnit.MICROSECONDS)
|
||||||
@Warmup(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 5, time = 1)
|
||||||
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 5, time = 1)
|
||||||
@Fork(3)
|
@Fork(3)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
public class InstantBench {
|
public class InstantBench {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -50,8 +50,8 @@ import org.openjdk.jmh.infra.Blackhole;
|
||||||
|
|
||||||
@BenchmarkMode(Mode.Throughput)
|
@BenchmarkMode(Mode.Throughput)
|
||||||
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
@OutputTimeUnit(TimeUnit.MILLISECONDS)
|
||||||
@Warmup(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Warmup(iterations = 5, time = 1)
|
||||||
@Measurement(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS)
|
@Measurement(iterations = 5, time = 1)
|
||||||
@Fork(3)
|
@Fork(3)
|
||||||
@State(Scope.Benchmark)
|
@State(Scope.Benchmark)
|
||||||
public class DateTimeFormatterBench {
|
public class DateTimeFormatterBench {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue