File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
common4j/src/main/com/microsoft/identity/common/java/opentelemetry Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -304,17 +304,12 @@ class DefaultBenchmarkSpanPrinter(
304304
305305 val result = mutableListOf<StatisticalStatusData >()
306306
307- // Precompute the number of occurrences for each status name
308- val occurrenceCountsByName = statusOccurrencesMap.keys
309- .groupBy { it.statusName }
310- .mapValues { it.value.size }
311-
312307 for ((occurrence, timingPairs) in statusOccurrencesMap) {
313308 val timeSincePreviousValues = timingPairs.map { it.first }
314309 val timeSinceStartValues = timingPairs.map { it.second }
315310
316311 // Create display name with occurrence number if there are multiple occurrences
317- val displayName = if ((occurrenceCountsByName[ occurrence.statusName] ? : 1 ) > 1 ) {
312+ val displayName = if (occurrence.occurrenceIndex > 1 ) {
318313 " ${occurrence.statusName} [${occurrence.occurrenceIndex} ]"
319314 } else {
320315 occurrence.statusName
You can’t perform that action at this time.
0 commit comments