mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-30 07:10:35 +00:00
bench: more generic amd cpu rename rules
This commit is contained in:
parent
f4743b0af1
commit
2217690702
1 changed files with 4 additions and 5 deletions
|
@ -80,7 +80,7 @@ function formatCPU($row)
|
|||
{
|
||||
$device = $row['device'];
|
||||
if (strpos($device, '(R)')) {
|
||||
// from /proc/cpuinfo
|
||||
// from /proc/cpuinfo (or vendor cpuid)
|
||||
$device = str_replace('(R)', '', $device);
|
||||
$device = str_replace('(TM)','', $device);
|
||||
$device = str_replace(' CPU','', $device);
|
||||
|
@ -102,12 +102,11 @@ function formatCPU($row)
|
|||
$device = str_replace(' AMD','', $device);
|
||||
$device = str_replace('AMD64','AMD', $device);
|
||||
}
|
||||
$device = str_replace(' APU with Radeon(tm) HD Graphics','', $device);
|
||||
$device = rtrim($device, ',');
|
||||
// todo, clean the vid and use linux names/vid from the db (in the db)
|
||||
$parts = explode(':', $row['vendorid']);
|
||||
$cores = (int) arraySafeVal($parts, 2);
|
||||
}
|
||||
$device = str_replace(' APU with Radeon(tm)','', $device);
|
||||
$device = str_replace(' APU with AMD Radeon','', $device);
|
||||
$device = preg_replace('/(HD|R\d) Graphics/','', $device);
|
||||
return $device;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue