diff --git a/tools/performance-server/ui/src/main/kotlin/main.kt b/tools/performance-server/ui/src/main/kotlin/main.kt index c4cf3f29c77..476ad66b7a0 100644 --- a/tools/performance-server/ui/src/main/kotlin/main.kt +++ b/tools/performance-server/ui/src/main/kotlin/main.kt @@ -223,7 +223,8 @@ fun main(args: Array) { if (data !is JsonArray) { error("Response is expected to be an array.") } - val builds = data.jsonArray.map { Build.create(it as JsonObject) }.sortedBy { it.buildNumber.substringAfterLast("-") } + val builds = data.jsonArray.map { Build.create(it as JsonObject) } + .sortedWith(compareBy ( { it.buildNumber.substringBefore("-").toDouble() }, { it.buildNumber.substringAfterLast("-").toInt() })) val branchesUrl = "$serverUrl/branches/${parameters["target"]}"