From 7f0228a905d9df9e29572c73228e2de3ebc166e5 Mon Sep 17 00:00:00 2001 From: Jose Gracia Date: Thu, 22 Feb 2024 11:38:55 +0100 Subject: [PATCH] Remove dependece on numpy Note, this changes the standard deviation from population (old, numpy) to sample (new, pandas) and thus numerical values. --- monitoring/db/scripts/get_detailed_power.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/monitoring/db/scripts/get_detailed_power.py b/monitoring/db/scripts/get_detailed_power.py index 54f44b5..170b0ac 100755 --- a/monitoring/db/scripts/get_detailed_power.py +++ b/monitoring/db/scripts/get_detailed_power.py @@ -98,7 +98,7 @@ class Power: def header(self): hd = "# all timestamp have unit miliseconds since unix epoch\n" hd += "# all power values have unit Watt\n" - hd += "timestamp,RESERVED,head_node_power,avg_node_power,median_node_power,min_node_power,max_node_power,std_dev_node_power" + hd += "timestamp,RESERVED,head_node_power,avg_node_power,median_node_power,min_node_power,max_node_power,std_dev_sample_node_power" # add node names here instead hd += "," + ",".join(self.nodes) hd += "\n" @@ -115,11 +115,11 @@ class Power: @staticmethod def _summarize_values(df): - values = df['power'].values - head = values[0] + values = df['power'] + head = values.iloc[0] min, max = values.min(), values.max() avg, stddev = values.mean(), values.std() - median = np.median(values) + median = values.median() return Power.to_csv(head, avg, median, min, max, stddev) def summarize_epoch(self, epoch):