pageTitle = "Algo benchmarks"; // ------------------------------------------------- $algos = array(); $in_db = dbolist("SELECT algo, count(id) as count FROM benchmarks B GROUP BY algo ORDER BY algo ASC, count DESC"); foreach ($in_db as $row) { $algos[$row['algo']] = $row['count']; } $options = ''; foreach($algos as $a => $count) { if($a == $algo) $options .= ''; else $options .= ''; } // ------------------------------------------------- $in_db = dbolist("SELECT B.type, B.idchip, C.chip, AVG(B.khps) as khps, AVG(B.power) as power, AVG(B.intensity) as intensity, AVG(B.freq) as freq FROM benchmarks B LEFT JOIN bench_chips C ON C.id = B.idchip WHERE B.idchip > 0 $algoFilter GROUP BY B.type, B.idchip ORDER BY khps DESC "); echo <<
Select Algo:  

Overall $algo performance

end; JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); showTableSorter('maintable', "{ tableClass: 'dataGrid', widgets: ['zebra','filter'], textExtraction: { 2: function(node, table, n) { return $(node).attr('data'); } }, widgetOptions: { filter_external: '.search', filter_columnFilters: false, filter_childRows : true, filter_ignoreCase: true } }"); echo << Type Chip Hashrate Power Int Freq END; foreach ($in_db as $row) { echo ''; echo ''.strtoupper($row['type']).''; $power = dboscalar('SELECT AVG(power) FROM benchmarks B WHERE idchip='.$row['idchip'].$algoFilter.' AND power > 10'); $chip = CHtml::link($row['chip'], '/bench?chip='.$row['idchip'].'&algo='.$algo); echo ''.$chip.''; echo ''.Itoa2(1000*round($row['khps'],3),3).'H'; echo ''.($power>0 ? round($power) : '-').''; echo ''.($row['intensity']>0 ? round($row['intensity']) : '-').''; echo ''.($row['freq']>0 ? round($row['freq']) : '-').''; echo ''; } echo '
'; echo 'Show current state of the database (devices/algos)
'; echo 'Learn how to submit your results'; echo '

'; echo << $('select.filter').change(function(event) { algo = jQuery('#algo_select').val(); window.location.href = '/bench/algo?algo='+algo; }); end;