Commit ee45850c authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Adds plot_exec_log in test

Showing with 1 addition and 4 deletions
+1 -4
......@@ -6,11 +6,9 @@ import matplotlib
def plot_exec_log(exec_log,names=None,last_session=True): # TODO: select session id instead of last session (if -1 : last)
time, process_id, tag, msg, session = parse_log(exec_log)
print(session)
if last_session:
time, process_id, tag, msg = time[session==max(session)], process_id[session==max(session)], tag[session==max(session)], msg[session==max(session)]
events = msg[tag == 'EVENT']
print(time)
category, name, state, time = np.empty(events.shape[0]).astype(str), np.empty(events.shape[0]).astype(str), \
np.empty(events.shape[0]).astype(str), np.empty(events.shape[0]).astype(str)
......
......@@ -64,7 +64,6 @@ def change_config(config_file, verbose=True):
def parse_log(log):
print(log)
msg_started = False
msg_tmp = ''
s = 0
......@@ -82,7 +81,7 @@ def parse_log(log):
session.append(s)
elif "{" in line or msg_started:
msg_tmp = msg_tmp + line
print(msg_tmp)
# print(msg_tmp)
msg_started = True
if "}" in line:
msg[-1] = msg[-1] + msg_tmp
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment