[K/N] Performance infra fixes
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user