Boavizta / boaviztapi

🛠 Giving access to BOAVIZTA reference data and methodologies trough a RESTful API
GNU Affero General Public License v3.0
66 stars 23 forks source link

Die size calculation for CPU should be enhanced #199

Closed csauge closed 10 months ago

csauge commented 1 year ago

Problem

Die size is sometimes not accurate

Solution

Ensure that missing die size in cpu_specs.csv is calculated from cpu_manufacturer.csv Goal is to complete die size per core correctly from cpu_specs.csv only (cpu_manufacturer.csv not used anymore) in: https://github.com/Boavizta/boaviztapi/blob/ad427595c9c991c2373fbce7c44dc99fa666e54e/boaviztapi/model/component/cpu.py#L163

Alternatives

Get more CPU specs with die size from other sites but we will still missing some info

Additional context or elements

if name provided:
    complete from name cpu_specs.csv to get total_die_size & nb_cores & family
if total_die_size & nb_cores exists (from name or from user input directly):
    return total_die_size / nb_cores 
elif family & nb_cores exists:
    if match 1 CPU: return total_die_size / nb_cores (of the family)
    elif match >1 CPU: return average total_die_size / nb_cores
    else (match 0 CPU):
        if family exists: get the CPU with the closest number of cores
        else: return default value
elif family exists:
    return average total_die_size / average nb_cores
da-ekchajzer commented 1 year ago

Link to #154

csauge commented 11 months ago

This is fixed with this commit: https://github.com/Boavizta/boaviztapi-utils/commit/1334e44219b126f75cc7df402d6efd7a8d8a9fcd

da-ekchajzer commented 10 months ago

Implemented in https://github.com/Boavizta/boaviztapi/pull/208

Thanks for your contribution !