[K/N] Performance infra fixes
This commit is contained in:
+1
-3
@@ -28,11 +28,9 @@ actual fun assert(value: Boolean, lazyMessage: () -> Any) {
|
||||
}
|
||||
|
||||
actual fun sendGetRequest(url: String, user: String?, password: String?, followLocation: Boolean) : String {
|
||||
val proxyServerAddress = "https://perf-proxy.labs.jb.gg/"
|
||||
val newUrl = proxyServerAddress + url
|
||||
val request = XMLHttpRequest()
|
||||
|
||||
request.open("GET", newUrl, false, user, password)
|
||||
request.open("GET", url, false, user, password)
|
||||
request.send()
|
||||
if (request.status == 200.toShort()) {
|
||||
return request.responseText
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
benchmarksAnalyzer.js*
|
||||
@@ -0,0 +1,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>
|
||||
Benchmarks report
|
||||
</title>
|
||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js">
|
||||
</script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js">
|
||||
</script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js">
|
||||
</script>
|
||||
<script type="text/javascript" src="compare/benchmarksAnalyzer.js"></script>
|
||||
<script type="text/javascript" src="compare/main.js"></script>
|
||||
</head>
|
||||
</html>
|
||||
@@ -0,0 +1,29 @@
|
||||
$(function() {
|
||||
var report = getUrlParameter('report');
|
||||
var compareToReport = getUrlParameter('compareTo');
|
||||
var hostname = window.location.href.substring(0, window.location.href.lastIndexOf('/'));
|
||||
if (report === undefined) {
|
||||
alert("Need to provide report parameter");
|
||||
throw new Error("Need to provide report parameter");
|
||||
}
|
||||
if (compareToReport === undefined) {
|
||||
benchmarksAnalyzer.main_kand9s$([report, "-r", "html", "-o", "html"]);
|
||||
} else {
|
||||
benchmarksAnalyzer.main_kand9s$([report,compareToReport, "-r", "html", "-o", "html"]);
|
||||
}
|
||||
});
|
||||
|
||||
var getUrlParameter = function getUrlParameter(sParam) {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
|
||||
if (sParameterName[0] === sParam) {
|
||||
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -132,7 +132,7 @@ fun customizeChart(chart: dynamic, chartContainer: String, jquerySelector: dynam
|
||||
previousBuild = builds.get(data.index - shift)
|
||||
shift++
|
||||
}
|
||||
val linkToDetailedInfo = "https://kotlin-native-performance.labs.jb.gg/?report=" +
|
||||
val linkToDetailedInfo = "https://kotlin-native-perf-summary.labs.jb.gg/compare?report=" +
|
||||
"${currentBuild.buildNumber}:${parameters["target"]}" +
|
||||
"${previousBuild?.let {
|
||||
"&compareTo=${previousBuild.buildNumber}:${parameters["target"]}"
|
||||
|
||||
Reference in New Issue
Block a user