diff --git a/monitoring/db/scripts/get_detailed_power.py b/monitoring/db/scripts/get_detailed_power.py index 3c1dbca..2eda58e 100644 --- a/monitoring/db/scripts/get_detailed_power.py +++ b/monitoring/db/scripts/get_detailed_power.py @@ -167,17 +167,16 @@ class Power: if __name__ == "__main__": - args = parse_arguments() + config = parse_arguments() + config.interval = 5 conn = init_db() - jobid = args.jobid - interval = 5 - query = init_query(jobid, interval) + query = init_query(config.jobid, config.interval) all_list = db_to_list(conn, query) #all_df = db_to_df(conn, query) - power = Power.from_list(all_list) # , jobid, interval) + power = Power.from_list(all_list) #print("#epochs", len(power.epochs)) # #print(power.header()) @@ -188,7 +187,7 @@ if __name__ == "__main__": #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(jobid)) + print("filename: ", power.to_file(config.jobid))