[K/N] Get rid of urls in perf infra code

This commit is contained in:
Pavel Kunyavskiy
2022-07-22 15:54:04 +02:00
committed by Space
parent f13c71bb06
commit d6f235679b
8 changed files with 50 additions and 15 deletions
@@ -26,4 +26,6 @@ actual fun assert(value: Boolean, lazyMessage: () -> Any) {
actual fun sendGetRequest(url: String, user: String?, password: String?, followLocation: Boolean) : String {
error("Unsupported")
}
}
actual fun getDefaultPerformanceServerUrl() : String? = null
@@ -132,7 +132,7 @@ fun customizeChart(chart: dynamic, chartContainer: String, jquerySelector: dynam
previousBuild = builds.get(data.index - shift)
shift++
}
val linkToDetailedInfo = "https://kotlin-native-perf-summary.labs.jb.gg/compare?report=" +
val linkToDetailedInfo = "${window.location.origin}/compare?report=" +
"${currentBuild.buildNumber}:${parameters["target"]}" +
"${previousBuild?.let {
"&compareTo=${previousBuild.buildNumber}:${parameters["target"]}"
@@ -190,7 +190,7 @@ fun getDatesComponents() = "${beforeDate?.let {"&before=${encodeURIComponent(it)
"${afterDate?.let {"&after=${encodeURIComponent(it)}"} ?: ""}"
fun main(args: Array<String>) {
val serverUrl = "https://kotlin-native-perf-summary.labs.jb.gg" // use "http://localhost:3000" for local debug.
val serverUrl = window.location.origin // use "http://localhost:3000" for local debug.
val zoomRatio = 2
// Get parameters from request.