mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
benchs: unique function to format devices labels
+ some new devices chips rules
This commit is contained in:
parent
2f6d74d90a
commit
580801f399
4 changed files with 31 additions and 12 deletions
|
@ -17,6 +17,8 @@ function BenchUpdateChips()
|
||||||
// bug in nvml 378.x and 381.x (linux + win) fixed in 382.05
|
// bug in nvml 378.x and 381.x (linux + win) fixed in 382.05
|
||||||
dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 378.%'");
|
dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 378.%'");
|
||||||
dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 381.%'");
|
dborun("UPDATE benchmarks SET realfreq=NULL WHERE realfreq<=200 AND driver LIKE '% 381.%'");
|
||||||
|
// sanity check on long fields (no html wanted)
|
||||||
|
dborun("DELETE FROM benchmarks WHERE device LIKE '%<%' OR client LIKE '%<%'");
|
||||||
|
|
||||||
$benchs = getdbolist('db_benchmarks', "IFNULL(chip,'')=''");
|
$benchs = getdbolist('db_benchmarks', "IFNULL(chip,'')=''");
|
||||||
foreach ($benchs as $bench) {
|
foreach ($benchs as $bench) {
|
||||||
|
@ -27,6 +29,13 @@ function BenchUpdateChips()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$rawdata = json_encode($bench->attributes);
|
||||||
|
if (strpos($rawdata,"script")) {
|
||||||
|
debuglog("bench record deleted : $rawdata");
|
||||||
|
$bench->delete();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$dups = getdbocount('db_benchmarks', "vendorid=:vid AND client=:client AND os=:os AND driver=:drv AND throughput=:thr AND userid=:uid",
|
$dups = getdbocount('db_benchmarks', "vendorid=:vid AND client=:client AND os=:os AND driver=:drv AND throughput=:thr AND userid=:uid",
|
||||||
array(':vid'=>$bench->vendorid, ':client'=>$bench->client, ':os'=>$bench->os, ':drv'=>$bench->driver,':thr'=>$bench->throughput,':uid'=>$bench->userid)
|
array(':vid'=>$bench->vendorid, ':client'=>$bench->client, ':os'=>$bench->os, ':drv'=>$bench->driver,':thr'=>$bench->throughput,':uid'=>$bench->userid)
|
||||||
);
|
);
|
||||||
|
|
|
@ -105,11 +105,7 @@ foreach ($in_db as $row) {
|
||||||
$chip = CHtml::link($chip, '/bench?chip='.$row['idchip'].'&algo=all');
|
$chip = CHtml::link($chip, '/bench?chip='.$row['idchip'].'&algo=all');
|
||||||
}
|
}
|
||||||
echo '<td>'.$chip.'</td>';
|
echo '<td>'.$chip.'</td>';
|
||||||
|
echo '<td>'.formatDevice($row).'</td>';
|
||||||
if ($row['type'] == 'gpu')
|
|
||||||
echo '<td>'.$row['device'].getProductIdSuffix($row).'</td>';
|
|
||||||
else
|
|
||||||
echo '<td>'.formatCPU($row).'</td>';
|
|
||||||
|
|
||||||
if (substr($vendorid,0,4) == '10de')
|
if (substr($vendorid,0,4) == '10de')
|
||||||
echo '<td><span class="generic" title="nVidia product id">'.$vendorid.'</span></td>';
|
echo '<td><span class="generic" title="nVidia product id">'.$vendorid.'</span></td>';
|
||||||
|
|
|
@ -140,6 +140,20 @@ function formatCPU($row)
|
||||||
return trim($device);
|
return trim($device);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatGPU($row)
|
||||||
|
{
|
||||||
|
$label = $row['device'].getProductIdSuffix($row);
|
||||||
|
return strip_tags($label);
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatDevice($row)
|
||||||
|
{
|
||||||
|
if ($row['type'] == 'gpu')
|
||||||
|
return formatGPU($row);
|
||||||
|
else
|
||||||
|
return formatCPU($row);
|
||||||
|
}
|
||||||
|
|
||||||
function getChipName($row)
|
function getChipName($row)
|
||||||
{
|
{
|
||||||
if ($row['type'] == 'cpu') {
|
if ($row['type'] == 'cpu') {
|
||||||
|
@ -179,6 +193,8 @@ function getChipName($row)
|
||||||
$chip = str_replace('650 Ti BOOST','650 Ti', $chip);
|
$chip = str_replace('650 Ti BOOST','650 Ti', $chip);
|
||||||
$chip = str_replace('760 Ti OEM','760 Ti', $chip);
|
$chip = str_replace('760 Ti OEM','760 Ti', $chip);
|
||||||
$chip = str_replace(' (Pascal)',' Pascal', $chip);
|
$chip = str_replace(' (Pascal)',' Pascal', $chip);
|
||||||
|
$chip = str_replace('Quadro M6000 24GB','Quadro M6000', $chip);
|
||||||
|
$chip = str_replace('Tesla P100 (PCIe)','Tesla P100', $chip);
|
||||||
$chip = str_replace('Tesla P100-SXM2-16GB','Tesla P100', $chip);
|
$chip = str_replace('Tesla P100-SXM2-16GB','Tesla P100', $chip);
|
||||||
$chip = str_replace('Tesla P100-PCIE-16GB','Tesla P100', $chip);
|
$chip = str_replace('Tesla P100-PCIE-16GB','Tesla P100', $chip);
|
||||||
$chip = str_replace('Tesla V100-SXM2-16GB','Tesla V100', $chip);
|
$chip = str_replace('Tesla V100-SXM2-16GB','Tesla V100', $chip);
|
||||||
|
|
|
@ -144,14 +144,12 @@ foreach ($db_rows as $row) {
|
||||||
echo '<td class="algo">'.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).'</td>';
|
echo '<td class="algo">'.CHtml::link($row['algo'],'/bench?algo='.$row['algo']).'</td>';
|
||||||
echo '<td data="'.$row['time'].'">'.$age.'</td>';
|
echo '<td data="'.$row['time'].'">'.$age.'</td>';
|
||||||
echo '<td>'.($row['idchip'] ? CHtml::link($row['chip'],'/bench?chip='.$row['idchip']) : $row['chip']).'</td>';
|
echo '<td>'.($row['idchip'] ? CHtml::link($row['chip'],'/bench?chip='.$row['idchip']) : $row['chip']).'</td>';
|
||||||
if ($row['type'] == 'cpu') {
|
echo '<td>'.formatDevice($row).'</td>';
|
||||||
echo '<td>'.formatCPU($row).'</td>';
|
echo '<td>'.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).'</td>';
|
||||||
echo '<td>'.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).'</td>';
|
if ($row['type'] == 'gpu') {
|
||||||
echo '<td>'.$row['arch'].'</td>';
|
|
||||||
} else {
|
|
||||||
echo '<td>'.$row['device'].getProductIdSuffix($row).'</td>';
|
|
||||||
echo '<td>'.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).'</td>';
|
|
||||||
echo '<td>'.formatCudaArch($row['arch']).'</td>';
|
echo '<td>'.formatCudaArch($row['arch']).'</td>';
|
||||||
|
} else {
|
||||||
|
echo '<td>'.$row['arch'].'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '<td data="'.$row['khps'].'">'.$hashrate.'</td>';
|
echo '<td data="'.$row['khps'].'">'.$hashrate.'</td>';
|
||||||
|
|
Loading…
Add table
Reference in a new issue