mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
benchs: show hashrate per watt
This commit is contained in:
parent
bea876bbd1
commit
3e0c13a2bd
1 changed files with 20 additions and 11 deletions
|
@ -150,16 +150,18 @@ foreach ($db_rows as $row) {
|
|||
echo '</tbody>';
|
||||
|
||||
if (!empty($algo)) {
|
||||
echo '<tfoot><tr class="ssfoot">';
|
||||
|
||||
echo '<th class="algo">'.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).'</td>';
|
||||
echo '<th> </td>';
|
||||
|
||||
$avg = dborow("SELECT AVG(khps) as khps, AVG(power) as power, AVG(intensity) as intensity, AVG(freq) as freq, ".
|
||||
"COUNT(*) as records ".
|
||||
"FROM benchmarks WHERE algo=:algo AND power > 5 AND $sqlFilter", array(':algo'=>$algo)
|
||||
);
|
||||
|
||||
if (arraySafeVal($avg, 'records') > 0) {
|
||||
echo '<tfoot><tr class="ssfoot">';
|
||||
|
||||
echo '<th class="algo">'.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).'</td>';
|
||||
echo '<th> </td>';
|
||||
|
||||
echo '<th colspan="3">Average ('.$avg["records"].' records)</td>';
|
||||
|
||||
echo '<th>'.Itoa2(1000*round($avg['khps'],3),3).'H</td>';
|
||||
|
@ -167,10 +169,17 @@ if (!empty($algo)) {
|
|||
echo '<th>'.round($avg['freq']).'</td>';
|
||||
echo '<th>'.round($avg['power']).'</td>';
|
||||
|
||||
echo '<th colspan="4"> </td>';
|
||||
$hpw = 0;
|
||||
if (floatval($avg['power']) > 0) {
|
||||
$hpw = floatval($avg['khps']) / floatval($avg['power']);
|
||||
}
|
||||
echo '<th>'.Itoa2(1000*round($hpw,3),3).'H/W</td>';
|
||||
|
||||
echo '<th colspan="3"> </td>';
|
||||
|
||||
echo '</tr></tfoot>';
|
||||
}
|
||||
}
|
||||
|
||||
echo'</table><br/>';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue