Show all'; foreach($algos as $a => $count) { if($a == $algo) $options .= ''; else $options .= ''; } // -------------- $algoFilter = $algo != 'all' ? ' AND B.algo='.sqlQuote($algo) : ''; $chips = array(); $in_db = dbolist("SELECT DISTINCT B.idchip as id, B.type, C.chip as name FROM benchmarks B". " LEFT JOIN bench_chips C ON C.id=B.idchip WHERE B.idchip IS NOT NULL $algoFilter AND $sqlFilter". " GROUP BY B.idchip, B.type ORDER BY B.type DESC, name ASC"); foreach ($in_db as $row) { $chips[$row['id']] = $row['name']; } $optchips = ''; foreach($chips as $id => $name) { if($id == $idchip) $optchips .= ''; else $optchips .= ''; } JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); include('functions.php'); $filtered = false; $algo = user()->getState('bench-algo'); if (empty($algo)) $algo = 'all'; if (empty($idchip)) $idchip = NULL; else $filtered = true; if (empty($vid)) $vid = NULL; else $filtered = true; $this->pageTitle = "Benchmarks"; $bench = new db_benchmarks; if($algo != 'all') $bench->algo = $algo; $bench->vendorid = $vid; $bench->idchip = $idchip; $dp = $bench->search(); $db_rows = $dp->getData(); echo <<
Select Algo:   Chip:  
end; echo '

'; if ($algo == 'all') { echo "Last 50 results"; } else { echo "Last 50 $algo results"; echo ", ".CHtml::link(" show totals", '/bench/algo?algo='.$algo); } 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 Chip Device Vendor ID Arch Hashrate Int. Freq W H/W Client OS Driver / Compiler {$actions} END; foreach ($db_rows as $row) { if (!isset($row['algo'])) continue; if ($row['chip'] == 'Virtual') continue; echo ''; $hashrate = Itoa2(1000*round($row['khps'],3),2).'H'; if ($algo == 'equihash') $hashrate = Itoa2(1000*round($row['khps'],5),3).' Sol/s'; $age = datetoa2($row['time']); echo ''.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).''; echo ''.$age.''; echo ''.($row['idchip'] ? CHtml::link($row['chip'],'/bench?chip='.$row['idchip']) : $row['chip']).''; if ($row['type'] == 'cpu') { echo ''.formatCPU($row).''; echo ''.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).''; echo ''.$row['arch'].''; } else { echo ''.$row['device'].getProductIdSuffix($row).''; echo ''.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).''; echo ''.formatCudaArch($row['arch']).''; } echo ''.$hashrate.''; if ($row['type'] == 'cpu') // threads echo ''.$row['throughput'].''; else if ($algo == 'neoscrypt') echo ''.$row['throughput'].'*'; else echo ''.($row['intensity']?$row['intensity']:'-').''; // freqs $title = ''; $class = ''; $content = $row['freq'] ? $row['freq'] : '-'; if (intval($row['realfreq']) > $row['freq'] / 10) { $content = $row['realfreq']; $class = 'real'; $title .= 'Base clock: '.$row['freq'].' MHz'."\n"; $title .= 'Mem clock: '.$row['realmemf'].' MHz ('.($row['realmemf']-$row['memf']).')'; } else if ($row['memf']) { $title = 'Mem Clock: '.$row['memf'].' MHz'; } $props = array('title'=>$title,'class'=>$class); echo CHtml::tag('td', $props, $content, true); // power $title = ''; $class = ''; $power = (double) $row['power']; // Adjust the 750 Ti nvml watts $factor = 1.0; if ($row['chip'] == '750' || $row['chip'] == '750 Ti' || $row['chip'] == 'Quadro K620') $factor = 2.0; $power *= $factor; $content = $power>0 ? $power : '-'; if ($row['plimit']) { $title = 'Power limit '.$row['plimit'].'W'; $class = 'limited'; } $props = array('title'=>$title,'class'=>$class); echo CHtml::tag('td', $props, $content, true); echo ''.($power>0 ? Itoa2(1000*round($row['khps'] / $power, 4),3) : '-').''; echo ''.formatClientName($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 ''; if (!empty($algo)) { $factor = isset($factor) ? $factor : 1.0; if ($idchip) $sqlFilter .= ' AND idchip='.intval($idchip); $avg = dborow("SELECT AVG(khps) as khps, AVG(power) as power, AVG(B.intensity) as intensity, AVG(freq) as freq, ". "COUNT(*) as records ". "FROM benchmarks B WHERE algo=:algo AND B.intensity > 0 AND power > 5 AND $sqlFilter", array(':algo'=>$algo) ); if (arraySafeVal($avg, 'records') == 0) { $avg = dborow("SELECT AVG(khps) as khps, '' as power, '' as intensity, '' as freq, ". "COUNT(*) as records ". "FROM benchmarks B WHERE algo=:algo AND $sqlFilter", array(':algo'=>$algo) ); } if (arraySafeVal($avg, 'records') > 0) { echo ''; echo ''.CHtml::link($algo,'/bench?algo='.$algo).''; echo ' '; echo 'Average ('.$avg["records"].' records)'; echo ''.Itoa2(1000*round($avg['khps'],3),2).'H'; echo ''.($avg['intensity'] ? round($avg['intensity'],1) : '').''; echo ''.($avg['freq'] ? round($avg['freq']) : '').''; $power = (double) $avg['power'] * $factor; echo ''.($power>0 ? round($power) : '').''; $hpw = ($power>0) ? $hpw = floatval($avg['khps']) / $power : 0; echo ''.($hpw ? Itoa2(1000*round($hpw,3),2) : '').''; echo ''; echo ($power>0 ? mbitcoinvaluetoa(powercost_mBTC($power)).' mBTC/day' : '').''; echo ' '; if ($this->admin) echo ' '; // admin ops echo ''; } } echo'
'; echo << Show current devices in the database
Learn how to submit your results

end;