Update benchmark page.
This commit is contained in:
@@ -15,25 +15,33 @@
|
|||||||
|
|
||||||
<h1>Jerryscript Benchmark</h1>
|
<h1>Jerryscript Benchmark</h1>
|
||||||
<p>
|
<p>
|
||||||
<span style="font-weight: bold; color: blue;">lower is better</span>
|
Show data
|
||||||
for both memory and performance.
|
<a href="?show=sum">by_sum</a> /
|
||||||
|
<a href="?show=max">by max</a>
|
||||||
|
value of subtests
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
<div id="wrapper_sunspider-1.0.2" class="content">
|
<div id="wrapper_sunspider-1.0.2" class="content">
|
||||||
<h3>sunspider-1.0.2</h3>
|
<h3>sunspider-1.0.2</h3>
|
||||||
<div id="chart_sunspider-1.0.2_memory" class="graph-container"></div>
|
<div id="chart_sunspider-1.0.2_memory" class="graph-container">loading...</div>
|
||||||
<div id="chart_sunspider-1.0.2_performance" class="graph-container"></div>
|
<div id="chart_sunspider-1.0.2_performance" class="graph-container">loading...</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="wrapper_ubench">
|
<div id="wrapper_ubench">
|
||||||
<h3>ubench</h3>
|
<h3>ubench</h3>
|
||||||
<div id="chart_ubench_memory" class="graph-container"></div>
|
<div id="chart_ubench_memory" class="graph-container">loading...</div>
|
||||||
<div id="chart_ubench_performance" class="graph-container"></div>
|
<div id="chart_ubench_performance" class="graph-container">loading...</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div><!-- container -->
|
</div><!-- container -->
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<span style="font-weight: bold; color: blue;">lower is better</span>
|
||||||
|
for both memory and performance.
|
||||||
|
</p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
+14
-6
@@ -10,6 +10,10 @@ Array.prototype.sum = function() {
|
|||||||
return this.reduce(function(a, b) { return a + b; });
|
return this.reduce(function(a, b) { return a + b; });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Array.prototype.max = function() {
|
||||||
|
return this.reduce(function(a, b) { return Math.max(a, b); });
|
||||||
|
};
|
||||||
|
|
||||||
Date.prototype.toFormattedString = function() {
|
Date.prototype.toFormattedString = function() {
|
||||||
var yyyy = this.getFullYear().toString();
|
var yyyy = this.getFullYear().toString();
|
||||||
var mm = (this.getMonth() + 1).toString();
|
var mm = (this.getMonth() + 1).toString();
|
||||||
@@ -42,6 +46,8 @@ function wrapHyperlink(address, text) {
|
|||||||
// main module
|
// main module
|
||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
|
|
||||||
|
var isSum = true;
|
||||||
|
|
||||||
var benchmarks = ['sunspider-1.0.2', 'ubench'];
|
var benchmarks = ['sunspider-1.0.2', 'ubench'];
|
||||||
var measureTypes = ['memory', 'performance'];
|
var measureTypes = ['memory', 'performance'];
|
||||||
var measureUnits = {'memory': 'kb', 'performance': 's'};
|
var measureUnits = {'memory': 'kb', 'performance': 's'};
|
||||||
@@ -62,9 +68,12 @@ google.load('visualization', '1', {packages: ['corechart', 'line']});
|
|||||||
google.setOnLoadCallback(main);
|
google.setOnLoadCallback(main);
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
var data_src = getParameterByName('src');
|
// get params
|
||||||
if (!data_src)
|
var data_src = getParameterByName('src') || 'data';
|
||||||
data_src = 'data';
|
var show = getParameterByName('show') || 'sum';
|
||||||
|
|
||||||
|
isSum = show === 'sum';
|
||||||
|
|
||||||
// fetch data via ajax
|
// fetch data via ajax
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
for (var d = beginDate; d <= today; d.setDate(d.getDate() + 1)) {
|
for (var d = beginDate; d <= today; d.setDate(d.getDate() + 1)) {
|
||||||
@@ -100,7 +109,7 @@ $(document).ajaxStop(function () {
|
|||||||
// record object contains a lot of subtests,
|
// record object contains a lot of subtests,
|
||||||
// we use sum of all values as representative value
|
// we use sum of all values as representative value
|
||||||
var values = Object.values(record);
|
var values = Object.values(record);
|
||||||
repVal = values.sum();
|
repVal = isSum ? values.sum() : values.max();
|
||||||
numTests = values.length;
|
numTests = values.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,8 +142,7 @@ $(document).ajaxStop(function () {
|
|||||||
['source ', engine_text],
|
['source ', engine_text],
|
||||||
['version ', info_text],
|
['version ', info_text],
|
||||||
['date ', date],
|
['date ', date],
|
||||||
['score ', score],
|
['score ', score + ' (' + tests + ' subtests)']];
|
||||||
['tests ', tests]];
|
|
||||||
return wrapTooltip(textData.map(function(v) { return v.join(': '); }).join('<br />'));
|
return wrapTooltip(textData.map(function(v) { return v.join(': '); }).join('<br />'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user