diff --git a/monitoring/db/scripts/get_detailed_power.py b/monitoring/db/scripts/get_detailed_power.py index b9525f5..6d98e38 100755 --- a/monitoring/db/scripts/get_detailed_power.py +++ b/monitoring/db/scripts/get_detailed_power.py @@ -179,9 +179,13 @@ class Power: def summarize_energy(self): return "# Total energy consumed by job: {energy:.0f} J\n".format(energy=self.energy_total()) + @staticmethod + def to_csv(args): + return ",".join(str(a) for a in args) + @staticmethod def pretty_print(args): - return ",".join(str(a) for a in args) + '\n' + return Power.to_csv(args) + '\n' def filename(self, jobid): fname = "detailed_power_{jobid}.hawk-pbs5.{first}-{last}.csv".format(