Use config object
This commit is contained in:
parent
8596fb4184
commit
bacc9e63c9
1 changed files with 5 additions and 6 deletions
|
@ -167,17 +167,16 @@ class Power:
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = parse_arguments()
|
config = parse_arguments()
|
||||||
|
config.interval = 5
|
||||||
|
|
||||||
conn = init_db()
|
conn = init_db()
|
||||||
jobid = args.jobid
|
query = init_query(config.jobid, config.interval)
|
||||||
interval = 5
|
|
||||||
query = init_query(jobid, interval)
|
|
||||||
|
|
||||||
all_list = db_to_list(conn, query)
|
all_list = db_to_list(conn, query)
|
||||||
#all_df = db_to_df(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("#epochs", len(power.epochs))
|
||||||
#
|
#
|
||||||
#print(power.header())
|
#print(power.header())
|
||||||
|
@ -188,7 +187,7 @@ if __name__ == "__main__":
|
||||||
#print('time:', power.summarize_time(ts))
|
#print('time:', power.summarize_time(ts))
|
||||||
#print('values:', power.summarize_values(values))
|
#print('values:', power.summarize_values(values))
|
||||||
#print('epoch:', power.pretty_print(power.summarize_epoch((ts, values))))
|
#print('epoch:', power.pretty_print(power.summarize_epoch((ts, values))))
|
||||||
print("filename: ", power.to_file(jobid))
|
print("filename: ", power.to_file(config.jobid))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue