pageTitle = "Devices"; $chips = array(); // todo: bench_devices table to cache that $in_db = $this->memcache->get_database_list("benchmarks-devices", "SELECT DISTINCT device, type, chip, idchip, vendorid FROM benchmarks WHERE idchip > 0 ORDER BY type DESC, device, vendorid", array(), 120 ); foreach ($in_db as $key => $row) { $vendorid = $row['vendorid']; $chip = $row['chip']; if (empty($chip)) $chip = getChipName($row); if (!empty($vendorid)) $chips[$vendorid] = $chip; } $chip = 'all'; $options = ''; foreach($chips as $a => $count) { if($a == $chip) $options .= ''; else $options .= ''; } echo <<

Devices in database

end; $algos_columns = ''; $month = time() - (30 * 24 * 3600); $algos = $this->memcache->get_database_column("benchmarks-algos", "SELECT DISTINCT algo FROM benchmarks WHERE time > $month ORDER BY algo LIMIT 20", array(), 120 ); foreach ($algos as $algo) { $algos_columns .= ''.$algo.''; } JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); showTableSorter('maintable', "{ tableClass: 'dataGrid', widgets: ['zebra','filter'], textExtraction: { // 4: function(node, table, n) { return $(node).attr('data'); } }, widgetOptions: { filter_external: '.search', filter_columnFilters: false, filter_childRows : true, filter_ignoreCase: true } }"); echo << Chip Device Vendor ID {$algos_columns} END; foreach ($in_db as $row) { // ignore virtual devices if ($row['chip'] == 'Virtual') continue; echo ''; $vendorid = $row['vendorid']; $chip = arraySafeVal($chips, $vendorid, '-'); if (!empty($row['idchip'])) { $chip = CHtml::link($chip, '/bench?chip='.$row['idchip'].'&algo=all'); } echo ''.$chip.''; echo ''.formatDevice($row).''; if (substr($vendorid,0,4) == '10de') echo ''.$vendorid.''; else echo ''.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).''; if (!empty($vendorid)) $records = dbocolumn("SELECT DISTINCT algo FROM benchmarks WHERE vendorid=:vid ", array(':vid'=>$vendorid)); else $records = dbocolumn("SELECT DISTINCT algo FROM benchmarks WHERE device=:dev ", array(':dev'=>$row['device'])); // cpu foreach ($algos as $algo) { $tick = ' '; if (in_array($algo, $records)) { $url = '/bench?algo='.$algo; if (!empty($row['idchip'])) { $url .= '&chip='.$row['idchip']; } $tick = CHtml::link('✓', $url); } echo ''.$tick.''; } echo ''; } echo '
'; echo 'Learn how to submit your results'; echo '

';