diff --git a/web/yaamp/core/backend/bench.php b/web/yaamp/core/backend/bench.php index dce1e7c..54e4627 100644 --- a/web/yaamp/core/backend/bench.php +++ b/web/yaamp/core/backend/bench.php @@ -17,6 +17,8 @@ function BenchUpdateChips() // 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 '% 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,'')=''"); foreach ($benchs as $bench) { @@ -27,6 +29,13 @@ function BenchUpdateChips() 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", array(':vid'=>$bench->vendorid, ':client'=>$bench->client, ':os'=>$bench->os, ':drv'=>$bench->driver,':thr'=>$bench->throughput,':uid'=>$bench->userid) ); diff --git a/web/yaamp/modules/bench/devices.php b/web/yaamp/modules/bench/devices.php index 5bc76d3..68174ee 100644 --- a/web/yaamp/modules/bench/devices.php +++ b/web/yaamp/modules/bench/devices.php @@ -105,11 +105,7 @@ foreach ($in_db as $row) { $chip = CHtml::link($chip, '/bench?chip='.$row['idchip'].'&algo=all'); } echo ''.$chip.''; - - if ($row['type'] == 'gpu') - echo ''.$row['device'].getProductIdSuffix($row).''; - else - echo ''.formatCPU($row).''; + echo ''.formatDevice($row).''; if (substr($vendorid,0,4) == '10de') echo ''.$vendorid.''; diff --git a/web/yaamp/modules/bench/functions.php b/web/yaamp/modules/bench/functions.php index 9e67a95..84b3e45 100644 --- a/web/yaamp/modules/bench/functions.php +++ b/web/yaamp/modules/bench/functions.php @@ -140,6 +140,20 @@ function formatCPU($row) 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) { if ($row['type'] == 'cpu') { @@ -179,6 +193,8 @@ function getChipName($row) $chip = str_replace('650 Ti BOOST','650 Ti', $chip); $chip = str_replace('760 Ti OEM','760 Ti', $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-PCIE-16GB','Tesla P100', $chip); $chip = str_replace('Tesla V100-SXM2-16GB','Tesla V100', $chip); diff --git a/web/yaamp/modules/bench/index.php b/web/yaamp/modules/bench/index.php index f45cd6e..1546dfc 100644 --- a/web/yaamp/modules/bench/index.php +++ b/web/yaamp/modules/bench/index.php @@ -144,14 +144,12 @@ foreach ($db_rows as $row) { 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 ''.formatDevice($row).''; + echo ''.CHtml::link($row['vendorid'],'/bench?vid='.$row['vendorid']).''; + if ($row['type'] == 'gpu') { echo ''.formatCudaArch($row['arch']).''; + } else { + echo ''.$row['arch'].''; } echo ''.$hashrate.'';