mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[metrics] Avoid recursive calls in case of calling SUM or AVERAGE for metrics selection
GitOrigin-RevId: a66170bd34f654bb8f81117ee91eb54dabd6d2b7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2dd7f10925
commit
ecaf4c93bf
@@ -21,14 +21,14 @@ enum class MetricsSelectionStrategy {
|
||||
LATEST -> metrics.maxBy { it.epochNanos }
|
||||
MINIMUM -> metrics.minBy { it.value }
|
||||
MAXIMUM -> metrics.maxBy { it.value }
|
||||
SUM -> ImmutableLongPointData.create(selectMetric(metrics).startEpochNanos,
|
||||
selectMetric(metrics).epochNanos,
|
||||
SUM -> ImmutableLongPointData.create(EARLIEST.selectMetric(metrics).startEpochNanos,
|
||||
LATEST.selectMetric(metrics).epochNanos,
|
||||
Attributes.empty(),
|
||||
metrics.sumOf { it.value })
|
||||
AVERAGE -> ImmutableLongPointData.create(selectMetric(metrics).startEpochNanos,
|
||||
selectMetric(metrics).epochNanos,
|
||||
AVERAGE -> ImmutableLongPointData.create(EARLIEST.selectMetric(metrics).startEpochNanos,
|
||||
LATEST.selectMetric(metrics).epochNanos,
|
||||
Attributes.empty(),
|
||||
selectMetric(metrics).value / metrics.size)
|
||||
SUM.selectMetric(metrics).value / metrics.size)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user