[K/N][perf] Added chart for execution time of debug binaries on performance server

This commit is contained in:
Elena Lepilkina
2022-04-04 09:09:57 +03:00
committed by Pavel Punegov
parent 087f7e3b31
commit f401573e5c
3 changed files with 30 additions and 5 deletions
@@ -64,7 +64,7 @@ class AWSNetworkConnector : NetworkConnector() {
override fun <T : String?> sendBaseRequest(method: RequestMethod, path: String, user: String?, password: String?,
acceptJsonContentType: Boolean, body: String?,
errorHandler: (url: String, response: dynamic) -> Nothing?): Promise<T> {
val useEnvironmentCredentials = false
val useEnvironmentCredentials = true // For easy test on localhost change to false.
val AWSEndpoint = AWSInstance.Endpoint(AWSDomain)
var request = AWSInstance.HttpRequest(AWSEndpoint, AWSRegion)
request.method = method.toString()
@@ -79,7 +79,7 @@
<div class="container-fluid">
<div class="row">
<div class="col">
<h4>Normalized execution time</h4>
<h4>Normalized execution time (release binaries)</h4>
<div id="exec_chart" class="chart"></div>
</div>
</div>
@@ -98,7 +98,13 @@
</div>
</div>
<p style="margin-top: 40px">
<div class="row">
<div class="col">
<h4>Normalized execution time (debug binaries)</h4>
<div id="exec_debug_chart" class="chart"></div>
</div>
</div>
<p style="margin-top: 40px">
<div class="row">
<div class="col">
<h4>Bundle size</h4>
@@ -190,7 +190,7 @@ fun getDatesComponents() = "${beforeDate?.let {"&before=${encodeURIComponent(it)
"${afterDate?.let {"&after=${encodeURIComponent(it)}"} ?: ""}"
fun main(args: Array<String>) {
val serverUrl = "http://localhost:3000"
val serverUrl = "https://kotlin-native-perf-summary.labs.jb.gg" // use "http://localhost:3000" for local debug.
val zoomRatio = 2
// Get parameters from request.
@@ -290,6 +290,7 @@ fun main(args: Array<String>) {
}
var execData = listOf<String>() to listOf<List<Double?>>()
var execDebugData = listOf<String>() to listOf<List<Double?>>()
var compileData = listOf<String>() to listOf<List<Double?>>()
var codeSizeData = listOf<String>() to listOf<List<Double?>>()
var bundleSizeData = listOf<String>() to listOf<List<Int?>>()
@@ -298,6 +299,7 @@ fun main(args: Array<String>) {
// Draw charts.
var execChart: dynamic = null
var execChartDebug: dynamic = null
var compileChart: dynamic = null
var codeSizeChart: dynamic = null
var bundleSizeChart: dynamic = null
@@ -362,6 +364,11 @@ fun main(args: Array<String>) {
"agr" to "samples",
"samples" to platformSpecificBenchs.removePrefix(",")
) else null).filterNotNull(),
"EXECUTION_TIME_DEBUG" to listOf(mapOf(
"normalize" to "true",
"buildSuffix" to "(Debug)"
)
),
"BUNDLE_SIZE" to listOf(mapOf("samples" to "KotlinNative",
"agr" to "samples"))
)
@@ -385,7 +392,8 @@ fun main(args: Array<String>) {
(if (getParameters.isEmpty()) "?" else "&") + "branch=${parameters["branch"]}"
else ""
val url = "$metricUrl$metric$getParameters$branchParameter${
val requestedMetric = if (metric.startsWith("EXECUTION_TIME")) "EXECUTION_TIME" else metric
val url = "$metricUrl$requestedMetric$getParameters$branchParameter${
if (parameters["type"] != "all")
(if (getParameters.isEmpty() && branchParameter.isEmpty()) "?" else "&") + "type=${parameters["type"]}"
else ""
@@ -434,6 +442,16 @@ fun main(args: Array<String>) {
execChart.update(getChartData(execData.first, execData.second))
}
}
"EXECUTION_TIME_DEBUG" -> {
execDebugData = labels to values
execChartDebug = Chartist.Line("#exec_debug_chart",
getChartData(labels, execDebugData.second),
getChartOptions(arrayOf("Geometric Mean (All)"), "Normalized time"))
buildsInfoPromise.then { builds ->
customizeChart(execChartDebug, "exec_debug_chart", js("$(\"#exec_debug_chart\")"), builds, parameters)
execChartDebug.update(getChartData(execDebugData.first, execDebugData.second))
}
}
"CODE_SIZE" -> {
codeSizeData = labels to values
codeSizeChart = Chartist.Line("#codesize_chart",
@@ -468,6 +486,7 @@ fun main(args: Array<String>) {
// Update all charts with using same data.
val updateAllCharts: () -> Unit = {
execChart.update(getChartData(execData.first, execData.second))
execChartDebug.update(getChartData(execDebugData.first, execDebugData.second))
compileChart.update(getChartData(compileData.first, compileData.second))
codeSizeChart.update(getChartData(codeSizeData.first, codeSizeData.second, sizeClassNames))
bundleSizeChart.update(getChartData(bundleSizeData.first, bundleSizeData.second, sizeClassNames))