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