<script>
var ub_test_description = { 
	0:"Dhrystone 2 using register variables", 
	1:"Double-Precision Whetstone", 
	2:"Execl Throughput", 
	3:"File Copy 1024 bufsize 2000 maxblocks", 
	4:"File Copy 256 bufsize 500 maxblocks", 
	5:"File Copy 4096 bufsize 8000 maxblocks", 
	6:"Pipe Throughput", 
	7:"Pipe-based Context Switching", 
	8:"Process Creation", 
	9:"Shell Scripts (1 concurrent)", 
	10:"Shell Scripts (8 concurrent)", 
	11:"System Call Overhead", 
	12:"CPU clock",
}

var ub_units = { 
	0:"lps", 
	1:"MWIPS", 
	2:"lps", 
	3:"KBps", 
	4:"KBps", 
	5:"KBps", 
	6:"lps", 
	7:"lps", 
	8:"lps", 
	9:"lpm", 
	10:"lpm", 
	11:"lps", 
	12:"MHz", 
}

var ub_baseline = {
	 0:116700.0, 
	 1:55.0, 
	 2:43.0, 
	 3:3960.0, 
	 4:1655.0, 
	 5:5800.0, 
	 6:12440.0, 
	 7:4000.0, 
	 8:126.0, 
	 9:42.4, 
	10:6.0, 
	11:15000, 
}


var ub_aria_g25 = {
	 0:632499.4, 
	 1:14.3, 
	 2:168.2, 
	 3:19329.7, 
	 4:5733.8, 
	 5:42070.4, 
	 6:49294.5, 
	 7:5889.1, 
	 8:443.2, 
	 9:235.4, 
	10:28.5, 
	11:201074.1, 
	12:400, 
}

var ub_acqua_a5 = {
	0:1465656.8, 
	1:241.2, 
	2:210.0, 
	3:34344.3, 
	4:11005.0, 
	5:73233.8, 
	6:127096.6, 
	7:36139.6, 
	8:667.8, 
	9:402.4, 
	10:51.5, 
	11:364193.5, 
	12:536, 
}

var ub_raspberry = {
	0:1258319.6, 
	1:29.7, 
	2:223.1, 
	3:26948.5, 
	4:8150.0, 
	5:64959.4, 
	6:123432.0, 
	7:15023.0, 
	8:634.1, 
	9:436.1, 
	10:56.1, 
	11:253373.7, 
	12:700, 
}

var board_name = {
	"Aria G25":ub_aria_g25,
	"Acqua A5":ub_acqua_a5,
	//"Baseline":ub_baseline,
	"Raspberry Pi Model B":ub_raspberry,
}

function RefreshResultTable() {
	contents="<table class='table table-striped table-bordered'>";
	contents+="<tr>";
	contents+="<th>Bench and features</th>";


	// Table header
	board_counter=0;
	$(".board_checkbox").each(function() {
		if (this.checked) {
			contents+="<th>" + this.value + "</th>";
			board_counter++;
		}
	});
	// Se non e' stata selezionata alcuna scheda toglie la tabella
	if (board_counter==0) {
		$("#results_table").html("");	
		return;
	}	
	contents+="<th>Units</th>";
	contents+="<th> </th>";
	
	// Table body
	contents+="</tr>";
	$.each(ub_test_description, function(key, val) {
		contents+="<tr>";
		contents+="<td>";
		contents+=val;
		contents+="</td>";

		dummy_counter=0;
		test_results=new Array();
		$(".board_checkbox").each(function() {
			if (this.checked) {
				contents+="<td align='right'>";
				contents+= board_name[this.value][key];
				test_results[dummy_counter]=board_name[this.value][key];
				contents+="</td>";
				dummy_counter++;
			}	
		});
	
		contents+="<td>";
		contents+=ub_units[key];
		contents+="</td>";

		contents+="<td align='right'>";
		if (dummy_counter==2) {
			test_results[0];
			test_results[1];
			percentuale=(((test_results[1]/test_results[0])*100)-100)
			if (percentuale>=0) {
				contents+="<font color='green'>";
				contents+="+";
			} else {
				contents+="<font color='red'>";
			}
			contents+=percentuale.toFixed(2);
			contents+=" %";
			contents+="</font>";
		
		} else {
			contents+=" ";
		}	
		contents+="</td>";


		contents+="</tr>";
	});
	contents+="</table>";
	
	$("#results_table").html(contents);	
}

$(document).ready(function() {
	// Checkbox con elenco delle schede
	contents="";
	$.each(board_name, function(key, val) {
		contents+="<input class='board_checkbox' type='checkbox' value='" + key + "'>" + key;
		contents+="<br/>";
	});
	contents+="<br/>";
	$("#board_selection").html(contents);	
	
	
	// Rinfresca la tabella dei risultati quando si seleziona una scheda
	$(".board_checkbox").change(function() {
		RefreshResultTable();
	});
});

</script>

#Speed test

<div class="text-success lead">
In this page we are listing some comparative tests between the Acme Boards and the boards of 
other competitors just to provide an idea on where the Acme boards are located in the current
Linux Embedded scenario.
</div>

##Select the boards to compare:

<div id="board_selection"></div>
<div id="results_table"></div>

##Utility used

* [byte-unixbench](https://code.google.com/p/byte-unixbench/)

##Resources

* [Byte-unixbench output on Acqua A5](./acquaa5-kernel-3.13.0-2014-01-27)
* [Byte-unixbench output on Aria G25](./ariag25-kernel-3.11.6-2013-10-25)

