From 09ab4f81243754ff7bc7b3720551cc8271f5aa58 Mon Sep 17 00:00:00 2001 From: lakith-rambukkanage Date: Sun, 27 Oct 2024 22:16:39 +0530 Subject: [PATCH] Fix non numeric mean bug --- distribution/scripts/jmeter/create-sar-summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/scripts/jmeter/create-sar-summary.py b/distribution/scripts/jmeter/create-sar-summary.py index f477f0b..ec90e2f 100755 --- a/distribution/scripts/jmeter/create-sar-summary.py +++ b/distribution/scripts/jmeter/create-sar-summary.py @@ -54,7 +54,7 @@ def main(): & (df['timestamp'] <= args.end_timestamp)] df = df.drop(columns=['hostname', 'interval', 'timestamp']) df = df.rename(columns=lambda x: re.sub(r'[%/\-]', '', x)) - sar_averages.update(df.mean().round(2).to_dict()) + sar_averages.update(df.mean(numeric_only=True).round(2).to_dict()) with open(args.output_file, 'w') as outfile: json.dump(sar_averages, outfile)