Remove debug output and fix whitespace
This commit is contained in:
parent
035803fbe2
commit
c0f6adcf67
1 changed files with 3 additions and 19 deletions
|
@ -37,7 +37,6 @@ class Power:
|
||||||
nodes = list(set([line[2] for line in data]))
|
nodes = list(set([line[2] for line in data]))
|
||||||
cls = Power(nodes)
|
cls = Power(nodes)
|
||||||
|
|
||||||
|
|
||||||
# for now ignore order to nodes
|
# for now ignore order to nodes
|
||||||
values = {}
|
values = {}
|
||||||
for l in data:
|
for l in data:
|
||||||
|
@ -62,7 +61,6 @@ class Power:
|
||||||
|
|
||||||
return Power.from_list(all_list)
|
return Power.from_list(all_list)
|
||||||
|
|
||||||
|
|
||||||
def to_file(self, jobid):
|
def to_file(self, jobid):
|
||||||
"""Dumps power data to file. Returns filename is succesfull and None if unsucessfull."""
|
"""Dumps power data to file. Returns filename is succesfull and None if unsucessfull."""
|
||||||
fname = self.filename(jobid)
|
fname = self.filename(jobid)
|
||||||
|
@ -130,6 +128,7 @@ class Power:
|
||||||
)
|
)
|
||||||
return fname
|
return fname
|
||||||
|
|
||||||
|
|
||||||
class MonitoringDB:
|
class MonitoringDB:
|
||||||
def __init__(self, verbose):
|
def __init__(self, verbose):
|
||||||
self.connection = self.init_db(verbose)
|
self.connection = self.init_db(verbose)
|
||||||
|
@ -185,6 +184,7 @@ class MonitoringDB:
|
||||||
query = self.build_query(jobid, interval)
|
query = self.build_query(jobid, interval)
|
||||||
return pd.read_sql(query, con=self.connection)
|
return pd.read_sql(query, con=self.connection)
|
||||||
|
|
||||||
|
|
||||||
class App:
|
class App:
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
self.config = config
|
self.config = config
|
||||||
|
@ -210,19 +210,3 @@ if __name__ == "__main__":
|
||||||
main = App(config)
|
main = App(config)
|
||||||
main.run_all()
|
main.run_all()
|
||||||
|
|
||||||
#power = Power.from_db(DB, config.jobid, config.interval)
|
|
||||||
#print("#epochs", len(power.epochs))
|
|
||||||
#
|
|
||||||
#print(power.header())
|
|
||||||
#
|
|
||||||
#epochs_iter = iter(power.epochs.items())
|
|
||||||
#ts, values = next(epochs_iter)
|
|
||||||
#print(ts, values)
|
|
||||||
#print('time:', power.summarize_time(ts))
|
|
||||||
#print('values:', power.summarize_values(values))
|
|
||||||
#print('epoch:', power.pretty_print(power.summarize_epoch((ts, values))))
|
|
||||||
#print("filename: ", power.to_file(config.jobid))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue