mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[evaluation-plugin] fix NPE in metrics computation
GitOrigin-RevId: 04b8b21fa6e30edbcd5c6837eaf382a5323fd380
This commit is contained in:
committed by
intellij-monorepo-bot
parent
46d847c7be
commit
f1c1158b4d
@@ -31,7 +31,7 @@ abstract class LatencyMetric(override val name: String) : Metric {
|
||||
class MaxLatencyMetric : LatencyMetric(NAME) {
|
||||
override val valueType = MetricValueType.INT
|
||||
|
||||
override fun compute(sample: List<Double>): Double = sample.max()
|
||||
override fun compute(sample: List<Double>): Double = sample.maxOrNull() ?: Double.NaN
|
||||
|
||||
companion object {
|
||||
const val NAME = "Max Latency"
|
||||
|
||||
Reference in New Issue
Block a user