Skip to content

Commit

Permalink
keep manufacturer names in cpu names
Browse files Browse the repository at this point in the history
Signed-off-by: Bastian Eisenmann <[email protected]>
  • Loading branch information
Bastian-Eisenmann committed Jan 14, 2025
1 parent c19d6f3 commit 4cd4a68
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ model,TDP,n_cores,TDP_per_core,source,manufacturer,threads
A8-7680,45.0,4.0,11.3,https://www.techpowerup.com/cpu-specs/,AMD,4
A9-9425 SoC,15.0,2.0,7.5,https://www.techpowerup.com/cpu-specs/,AMD,2
7552,200.0,48.0,4.2,https://www.amd.com/system/files/documents/AMD-EPYC-7002-Series-Datasheet.pdf,AMD,96
EPYC 7251,120.0,8.0,15.0,https://www.amd.com/en/products/cpu/amd-epyc-7251,AMD,16
AMD EPYC 7251,120.0,8.0,15.0,https://www.amd.com/en/products/cpu/amd-epyc-7251,AMD,16
Athlon 3000G,35.0,2.0,17.5,https://www.techpowerup.com/cpu-specs/,AMD,4
Core 2 Quad Q6600,95.0,4.0,23.8,https://www.techpowerup.com/cpu-specs/,Intel,4
Core i3-10100,65.0,4.0,16.3,https://www.techpowerup.com/cpu-specs/,Intel,8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"A8-7680": 4,
"A9-9425 SoC": 2,
"7552": 96,
"EPYC 7251": 16,
"AMD EPYC 7251": 16,
"Athlon 3000G": 4,
"FX-6300": 6,
"FX-8350": 8,
Expand Down Expand Up @@ -94,7 +94,6 @@
}

all_cpus_threads = amd_cpus_threads | intel_cpus_threads
df['model'] = df['model'].apply(lambda x: x.replace("AMD","").strip())
df['threads'] = df['model'].apply(lambda x: all_cpus_threads[x])

# Save the updated dataset or print it
Expand Down
4 changes: 2 additions & 2 deletions plugins/nf-co2footprint/src/resources/tdp-cpu/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def read_and_process_amd(processors, file_path):
# Process each row in the CSV
for row in csv_reader:
try:
processor_model = row["Name"].replace("AMD", "").replace("™","").strip()
processor_model = row["Name"].replace("™","").strip()

tdp = row["Default TDP"].strip().replace("W", "").replace("+", "")
n_cores = row["# of CPU Cores"].strip()
Expand Down Expand Up @@ -185,7 +185,7 @@ def read_and_process_intel(processors, root_dir):

if tdp == "":
continue
processor_model = processor_name.replace("Intel", "").replace("®","").strip()
processor_model = processor_name.replace("®","").strip()
tdp = float(tdp)
n_cores = int(details["Total Cores"].strip())
n_threads = int(details["Total Threads"].strip()) # Thread count equals core count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CO2FootprintFactoryTest extends Specification {
def traceRecord = new TraceRecord()
traceRecord.realtime = (1 as Long) * (3600000 as Long)
traceRecord.cpus = 1
traceRecord.cpu_model = "AMD EPYC 7251"
traceRecord.cpu_model = "EPYC 7251"
traceRecord.'%cpu' = 100.0
traceRecord.memory = (7 as Long) * (1000000000 as Long)

Expand Down

0 comments on commit 4cd4a68

Please sign in to comment.