Skip to content

Commit 852903d

Browse files
committed
simple name
1 parent a2cd759 commit 852903d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ enum class MetricType {
4343
|| this == ResponseTime_75Percentile
4444
|| this == ResponseTime_50Percentile
4545

46+
val simpleName: String
47+
get() = when (this) {
48+
Throughput_Average -> "Throughput"
49+
ResponseTime_Average -> "Response"
50+
ServiceLevelAgreement_Average -> "SLA"
51+
ResponseTime_99Percentile -> "Resp(99%)"
52+
ResponseTime_95Percentile -> "Resp(95%)"
53+
ResponseTime_90Percentile -> "Resp(90%)"
54+
ResponseTime_75Percentile -> "Resp(75%)"
55+
ResponseTime_50Percentile -> "Resp(50%)"
56+
}
57+
4658
companion object {
4759
//todo: remove
4860
fun realValueOf(name: String): MetricType {

0 commit comments

Comments
 (0)