Skip to content

Commit 87d8fd0

Browse files
committed
spotless
1 parent c748bf3 commit 87d8fd0

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

sdk/all/src/jmh/java/io/opentelemetry/sdk/MetricRecordBenchmark.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@
9292
* spreading their record activities over more distinct series. The highest contention scenario is
9393
* cardinality=1, threads=4. Any scenario with threads=1 has zero contention.
9494
*
95-
* <p>To make the cardinality dimension meaningful under contention, each thread traverses the series
96-
* in its own independent (per-thread shuffled) order — see {@link ThreadState}. This models
95+
* <p>To make the cardinality dimension meaningful under contention, each thread traverses the
96+
* series in its own independent (per-thread shuffled) order — see {@link ThreadState}. This models
9797
* independent threads recording to arbitrary series. A naive shared {@code i % cardinality} index
9898
* would instead march all threads through the same series in lockstep (contention self-synchronizes
9999
* them), collapsing high-cardinality multi-thread runs into a single rotating hotspot that behaves
@@ -235,8 +235,8 @@ public void tearDown() {
235235
* series rather than marching through the same series in lockstep. Without this, the shared
236236
* sequential {@code i % cardinality} index plus contention's self-synchronizing effect collapses
237237
* the high-cardinality, multi-thread cases into a single rotating hotspot (effectively
238-
* cardinality=1 contention), which does not reflect real-world recording where independent threads
239-
* touch arbitrary series.
238+
* cardinality=1 contention), which does not reflect real-world recording where independent
239+
* threads touch arbitrary series.
240240
*/
241241
@State(Scope.Thread)
242242
public static class ThreadState {
@@ -250,7 +250,8 @@ public void setup(BenchmarkState benchmarkState) {
250250
order[i] = i;
251251
}
252252
// Distinct seed per thread => independent permutations => no cross-thread lockstep.
253-
Random random = new Random(INITIAL_SEED + benchmarkState.threadSeedSequence.getAndIncrement());
253+
Random random =
254+
new Random(INITIAL_SEED + benchmarkState.threadSeedSequence.getAndIncrement());
254255
for (int i = cardinality - 1; i > 0; i--) {
255256
int j = random.nextInt(i + 1);
256257
int tmp = order[i];

0 commit comments

Comments
 (0)