Fix HistogramScaleBenchmark, use the right ThreadState, clarify difference (#4691)
* Fix HistogramScaleBenchmark, use the right ThreadState, clarify difference Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> * Update sdk/metrics/src/jmh/java/io/opentelemetry/sdk/metrics/internal/aggregator/HistogramScaleBenchmark.java Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com> * Update HistogramScaleBenchmark.java Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com> Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
This commit is contained in:
parent
734b13e9c5
commit
b5d0d08ad8
|
@ -26,7 +26,8 @@ import org.openjdk.jmh.annotations.Warmup;
|
|||
*
|
||||
* <p>This benchmark must be interpreted carefully. We're looking for startup costs of histograms
|
||||
* and need to tease out the portion of recorded time from scaling buckets vs. general algorithmic
|
||||
* performance.
|
||||
* performance. The difference, compared with HistogramBenchmark, is that setup is called before
|
||||
* each invocation.
|
||||
*/
|
||||
@BenchmarkMode(Mode.AverageTime)
|
||||
@OutputTimeUnit(TimeUnit.NANOSECONDS)
|
||||
|
@ -57,7 +58,7 @@ public class HistogramScaleBenchmark {
|
|||
|
||||
@Benchmark
|
||||
@Threads(value = 1)
|
||||
public void scaleUp(HistogramBenchmark.ThreadState threadState) {
|
||||
public void scaleUp(ThreadState threadState) {
|
||||
threadState.record();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue