From 41d45d80b60fd434c1e125e3705157ae293b58f1 Mon Sep 17 00:00:00 2001 From: Ondrej Lichtner Date: Fri, 1 Dec 2023 14:46:14 +0100 Subject: [PATCH] Perf/Measurement/Results: add metric names to result descriptions Signed-off-by: Ondrej Lichtner --- .../Perf/Measurements/Results/FlowMeasurementResults.py | 8 ++++---- .../Perf/Measurements/Results/TcRunMeasurementResults.py | 2 +- .../Measurements/Results/XDPBenchMeasurementResults.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lnst/RecipeCommon/Perf/Measurements/Results/FlowMeasurementResults.py b/lnst/RecipeCommon/Perf/Measurements/Results/FlowMeasurementResults.py index c2277c6e6..622c2b855 100644 --- a/lnst/RecipeCommon/Perf/Measurements/Results/FlowMeasurementResults.py +++ b/lnst/RecipeCommon/Perf/Measurements/Results/FlowMeasurementResults.py @@ -143,7 +143,7 @@ def describe(self): desc = [] desc.append(str(self.flow)) desc.append( - "Generator measured throughput: {tput:.2f} +-{deviation:.2f}({percentage:.2f}%) {unit} per second.".format( + "Generator measured throughput (generator_results): {tput:.2f} +-{deviation:.2f}({percentage:.2f}%) {unit} per second.".format( tput=generator.average, deviation=generator.std_deviation, percentage=self._deviation_percentage(generator), @@ -151,14 +151,14 @@ def describe(self): ) ) desc.append( - "Generator process CPU data: {cpu:.2f} +-{cpu_deviation:.2f} {cpu_unit} per second.".format( + "Generator process CPU data (generator_cpu_stats): {cpu:.2f} +-{cpu_deviation:.2f} {cpu_unit} per second.".format( cpu=generator_cpu.average, cpu_deviation=generator_cpu.std_deviation, cpu_unit=generator_cpu.unit, ) ) desc.append( - "Receiver measured throughput: {tput:.2f} +-{deviation:.2f}({percentage:.2f}%) {unit} per second.".format( + "Receiver measured throughput (receiver_results): {tput:.2f} +-{deviation:.2f}({percentage:.2f}%) {unit} per second.".format( tput=receiver.average, deviation=receiver.std_deviation, percentage=self._deviation_percentage(receiver), @@ -166,7 +166,7 @@ def describe(self): ) ) desc.append( - "Receiver process CPU data: {cpu:.2f} +-{cpu_deviation:.2f} {cpu_unit} per second.".format( + "Receiver process CPU data (receiver_cpu_stats): {cpu:.2f} +-{cpu_deviation:.2f} {cpu_unit} per second.".format( cpu=receiver_cpu.average, cpu_deviation=receiver_cpu.std_deviation, cpu_unit=receiver_cpu.unit, diff --git a/lnst/RecipeCommon/Perf/Measurements/Results/TcRunMeasurementResults.py b/lnst/RecipeCommon/Perf/Measurements/Results/TcRunMeasurementResults.py index 19eaa3ee1..8c7de79ee 100644 --- a/lnst/RecipeCommon/Perf/Measurements/Results/TcRunMeasurementResults.py +++ b/lnst/RecipeCommon/Perf/Measurements/Results/TcRunMeasurementResults.py @@ -53,7 +53,7 @@ def description(self): f" tc run with {self.rule_install_rate.value} rules" \ f" num_instances={self.measurement.num_instances}" \ f" took {self.rule_install_rate.duration} seconds " \ - f"({self.rule_install_rate.average} rules/sec)" + f"(rule_install_rate={self.rule_install_rate.average} rules/sec)" @property def time_taken(self): diff --git a/lnst/RecipeCommon/Perf/Measurements/Results/XDPBenchMeasurementResults.py b/lnst/RecipeCommon/Perf/Measurements/Results/XDPBenchMeasurementResults.py index 5b137c02f..6835a4fbb 100644 --- a/lnst/RecipeCommon/Perf/Measurements/Results/XDPBenchMeasurementResults.py +++ b/lnst/RecipeCommon/Perf/Measurements/Results/XDPBenchMeasurementResults.py @@ -43,12 +43,12 @@ def describe(self) -> str: desc = [] desc.append(str(self.flow)) desc.append( - "Generator generated: {tput:,f} {unit} per second.".format( + "Generator generated (generator_results): {tput:,f} {unit} per second.".format( tput=generator.average, unit=generator.unit ) ) desc.append( - "Receiver processed: {tput:,f} {unit} per second.".format( + "Receiver processed (receiver_results): {tput:,f} {unit} per second.".format( tput=receiver.average, unit=receiver.unit ) )