We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f1de48 commit 5b6b782Copy full SHA for 5b6b782
src/main/kotlin/spp/protocol/artifact/metrics/MetricType.kt
@@ -59,6 +59,13 @@ data class MetricType(val metricId: String) {
59
Endpoint_RespTime_Percentiles,
60
INSTANCE_JVM_CPU
61
)
62
+
63
+ fun fromBestGuess(source: String): MetricType {
64
+ val metricId = source.lowercase().replace(" ", "_")
65
+ val metricType = ALL.firstOrNull { it.metricId == metricId }
66
+ if (metricType != null) return metricType
67
+ return MetricType(metricId)
68
+ }
69
}
70
71
constructor(jsonObject: JsonObject) : this(
0 commit comments