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]))
|
||||
cls = Power(nodes)
|
||||
|
||||
|
||||
# for now ignore order to nodes
|
||||
values = {}
|
||||
for l in data:
|
||||
|
@ -62,7 +61,6 @@ class Power:
|
|||
|
||||
return Power.from_list(all_list)
|
||||
|
||||
|
||||
def to_file(self, jobid):
|
||||
"""Dumps power data to file. Returns filename is succesfull and None if unsucessfull."""
|
||||
fname = self.filename(jobid)
|
||||
|
@ -130,6 +128,7 @@ class Power:
|
|||
)
|
||||
return fname
|
||||
|
||||
|
||||
class MonitoringDB:
|
||||
def __init__(self, verbose):
|
||||
self.connection = self.init_db(verbose)
|
||||
|
@ -185,6 +184,7 @@ class MonitoringDB:
|
|||
query = self.build_query(jobid, interval)
|
||||
return pd.read_sql(query, con=self.connection)
|
||||
|
||||
|
||||
class App:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
|
@ -197,7 +197,7 @@ class App:
|
|||
except RuntimeError:
|
||||
print('No data found for job ID "{}"'.format(jobid))
|
||||
continue
|
||||
|
||||
|
||||
fn = power.to_file(jobid)
|
||||
if fn:
|
||||
print('Created file {fn}'.format(fn=fn))
|
||||
|
@ -210,19 +210,3 @@ if __name__ == "__main__":
|
|||
main = App(config)
|
||||
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