From 79f90a5933deedb4e10292f5ecfc804d06b22237 Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Wed, 18 Dec 2024 12:26:40 -0800 Subject: [PATCH] clean up benchmark summary table when no min latency collected --- cmd/report/report.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/report/report.go b/cmd/report/report.go index 48c189c..e378925 100644 --- a/cmd/report/report.go +++ b/cmd/report/report.go @@ -354,7 +354,7 @@ func benchmarkSummaryFromTableValues(allTableValues []report.TableValues, output {Name: "Maximum Temperature", Values: []string{getValueFromTableValues(getTableValues(allTableValues, report.CPUTemperatureTableName), "Maximum Temperature", 0)}}, {Name: "Minimum Power", Values: []string{getValueFromTableValues(getTableValues(allTableValues, report.CPUPowerTableName), "Minimum Power", 0)}}, {Name: "Memory Peak Bandwidth"}, - {Name: "Memory Minimum Latency", Values: []string{getValueFromTableValues(getTableValues(allTableValues, report.MemoryLatencyTableName), "Latency (ns)", 0) + " ns"}}, + {Name: "Memory Minimum Latency"}, {Name: "Microarchitecture", Values: []string{getValueFromTableValues(getTableValues(allTableValues, report.SystemSummaryTableName), "Microarchitecture", 0)}}, {Name: "Sockets", Values: []string{getValueFromTableValues(getTableValues(allTableValues, report.SystemSummaryTableName), "Sockets", 0)}}, }, @@ -386,6 +386,13 @@ func benchmarkSummaryFromTableValues(allTableValues []report.TableValues, output } else { tableValues.Fields[6].Values = []string{""} } + // get the minimum memory latency + minLatency := getValueFromTableValues(getTableValues(allTableValues, report.MemoryLatencyTableName), "Latency (ns)", 0) + if minLatency != "" { + tableValues.Fields[7].Values = []string{minLatency + " ns"} + } else { + tableValues.Fields[7].Values = []string{""} + } return tableValues }