Show all'; foreach($algos as $a => $count) { if($a == $algo) $options .= ''; else $options .= ''; } JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); include('functions.php'); $algo = user()->getState('bench-algo'); if (empty($algo)) $algo = 'all'; if (empty($vid)) $vid = NULL; $this->pageTitle = "Benchmarks"; $bench = new db_benchmarks; if($algo != 'all') $bench->algo = $algo; $bench->vendorid = $vid; $dp = $bench->search(); $db_rows = $dp->getData(); echo <<
Select Algo:  
end; echo '

'; if ($algo == 'all') { echo "Last 50 results"; } else { echo "Last 50 $algo results"; } echo '

'; showTableSorter('maintable', "{ tableClass: 'dataGrid', widgets: ['zebra','filter'], textExtraction: { 1: function(node, table, n) { return $(node).attr('data'); }, 5: function(node, table, n) { return $(node).attr('data'); }, 6: function(node, table, n) { return $(node).attr('data'); } }, widgetOptions: { filter_external: '.search', filter_columnFilters: false, filter_childRows : true, filter_ignoreCase: true } }"); $actions = ''; if ($this->admin) { $actions = 'Admin'; } echo << Algo Time Device Arch Vendor ID Hashrate Int. Freq Watts Client OS Driver {$actions} END; foreach ($db_rows as $row) { if ($vid && $row['vendorid'] != $vid) continue; echo ''; $hashrate = Itoa2(1000*round($row['khps'],3),3).'H'; $age = datetoa2($row['time']); echo ''.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).''; echo ''.$age.''; echo ''.$row['device'].getProductIdSuffix($row).''; echo ''.formatCudaArch($row['arch']).''; echo ''.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).''; echo ''.$hashrate.''; if ($algo == 'neoscrypt') echo ''.$row['throughput'].'*'; else echo ''.$row['intensity'].''; echo ''.$row['freq'].''; echo ''.(empty($row['power']) ? '-' : $row['power']).''; echo ''.$row['client'].''; echo ''.$row['os'].''; echo ''.$row['driver'].''; if ($this->admin) { $props = array('style'=>'color: darkred;'); echo ''.CHtml::link("delete", '/bench/del?id='.$row['id'], $props).''; } echo ''; } echo '
'; echo << Show current state of the database (devices/algos)

end;