diff --git a/src/db12/benchmark.py b/src/db12/benchmark.py index 82a11ff..6e91699 100644 --- a/src/db12/benchmark.py +++ b/src/db12/benchmark.py @@ -228,7 +228,11 @@ def get_norm_correction(norm_computed): try: with open("/proc/cpuinfo", "r") as file_object: content = file_object.read() - cpu_brand_name = re.findall("model name\t: ([a-zA-Z]*)", content)[0] + cpu_brand_name = re.findall("vendor_id\t: ([a-zA-Z]*)", content)[0] + if cpu_brand_name == "GenuineIntel": + cpu_brand_name = "Intel" + elif cpu_brand_name == "AuthenticAMD": + cpu_brand_name = "AMD" except (IOError, IndexError): logging.warning( "Cannot correct the score, return the raw norm: cannot access CPU information" diff --git a/src/db12/factors.json b/src/db12/factors.json index c06fe57..e6c1a7b 100644 --- a/src/db12/factors.json +++ b/src/db12/factors.json @@ -5,6 +5,12 @@ "Intel": 0.86, "AMD": 0.71 } + }, + "3.11": { + "cpu_brand": { + "Intel": 0.912400392678881, + "AMD": 0.912400392678881 + } } } }