Refactor pretty_print to outine to_csv
This commit is contained in:
parent
c22959f4b9
commit
5b07b407de
1 changed files with 5 additions and 1 deletions
|
@ -179,9 +179,13 @@ class Power:
|
||||||
def summarize_energy(self):
|
def summarize_energy(self):
|
||||||
return "# Total energy consumed by job: {energy:.0f} J\n".format(energy=self.energy_total())
|
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
|
@staticmethod
|
||||||
def pretty_print(args):
|
def pretty_print(args):
|
||||||
return ",".join(str(a) for a in args) + '\n'
|
return Power.to_csv(args) + '\n'
|
||||||
|
|
||||||
def filename(self, jobid):
|
def filename(self, jobid):
|
||||||
fname = "detailed_power_{jobid}.hawk-pbs5.{first}-{last}.csv".format(
|
fname = "detailed_power_{jobid}.hawk-pbs5.{first}-{last}.csv".format(
|
||||||
|
|
Loading…
Reference in a new issue