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'); }, 4: 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 H/W Cost* Reward Profit** Int Freq END; if ($algo != 'all') { $t1 = time() - 24*60*60; $algo_24E = dboscalar("SELECT avg(price) FROM hashrate WHERE time>$t1 AND algo=:algo", array(':algo'=>$algo)); $algo_24E = $algo_24E / (1000 * yaamp_algo_mBTC_factor($algo)); // mBTC per kHs } else { $this->goback(); } foreach ($in_db as $row) { if ($row['chip'] == 'Virtual') continue; 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.''; $reward = $row['khps']*$algo_24E; // 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; $cost = powercost_mBTC($power); $ppw = $power>0 ? (double) $row['khps']/$power : 0.; $ppw_label = ($power>0 ? Itoa2(1000*round($ppw,3),3).'H' : '-'); if ($algo == 'equihash') { echo ''.round(1000*$row['khps'],1).' Sol/s'; $ppw_label = ($power>0 ? Itoa2(1000*round($ppw,5),2).' Sol/W' : '-'); } else echo ''.Itoa2(1000*round($row['khps'],3),3).'H'; if ($factor > 1.0) echo ''.($power>0 ? round($power).' W*' : '-').''; else echo ''.($power>0 ? round($power).' W' : '-').''; echo ''.$ppw_label.''; echo ''.($power>0 ? mbitcoinvaluetoa($cost) : '-').''; echo ''.mbitcoinvaluetoa($reward).''; if ($reward < $cost) echo ''.($power>0 ? mbitcoinvaluetoa($reward - $cost) : '-').''; else echo ''.($power>0 ? mbitcoinvaluetoa($reward - $cost) : '-').''; echo ''.($row['intensity']>0 ? round($row['intensity']) : '-').''; echo ''.($row['freq']>0 ? round($row['freq']) : '-').''; echo ''; } echo '
'; echo '* Device power cost per day based on '.YIIMP_KWH_USD_PRICE.' USD per kWh
'; echo '** Reward and profit are based on the average estimates from the last 24 hours

'; echo 'Show current devices in the database
'; 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;