Skip to content
Snippets Groups Projects
Commit 0fe82ddf authored by Jake Taylor's avatar Jake Taylor
Browse files

add better timestamps to e2eReport.py

parent 368b329d
No related branches found
No related tags found
1 merge request!4Release
...@@ -74,8 +74,11 @@ def main(): ...@@ -74,8 +74,11 @@ def main():
messages_received[received_message] = {"receiver": os.path.basename(path)} messages_received[received_message] = {"receiver": os.path.basename(path)}
# Capture message timestamp # Capture message timestamp
received_timestamp_str = re.findall('INFO (.{19})', line)[0] received_timestamp_str = re.findall('INFO (.{19}\.{0,1}\d{0,6})', line)[0]
received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S') try:
received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S.%f')
except ValueError:
received_timestamp = datetime.datetime.strptime(received_timestamp_str, '%Y/%m/%d %H:%M:%S')
log.debug("Located received timestamp: {}".format(received_timestamp)) log.debug("Located received timestamp: {}".format(received_timestamp))
messages_received[received_message]["received"] = received_timestamp messages_received[received_message]["received"] = received_timestamp
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment