Skip to content

Commit a846628

Browse files
committed
chore: asHistorical
1 parent 464da89 commit a846628

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/kotlin/spp/protocol/artifact/metrics/MetricType.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ data class MetricType(val metricId: String) {
164164
return MetricType(metricId + "_realtime")
165165
}
166166

167+
fun asHistorical(): MetricType {
168+
return MetricType(metricId.substringBefore("_realtime"))
169+
}
170+
167171
fun equalsIgnoringRealtime(otherMetricType: MetricType): Boolean {
168172
return equalsIgnoringRealtime(otherMetricType.metricId)
169173
}

0 commit comments

Comments
 (0)