I'm sharing one quick script made in python to analyse logs and discover the most slow steps in actions
in this case it is set to only show entries that takes more than 3 seconds to execute
#!/usr/bin/env python3
from datetime import datetime
lasttime = 0
items = []
with open("job-logs3.txt") as file:
for item in file:
item = item.replace('\ufeff', '')
ts = item[:19].replace('T', ' ')
line = item[29:].strip()
d = datetime.strptime(ts, '%Y-%m-%d %H:%M:%S')
if lasttime != 0:
delta = d - lasttime
obj = (d, line, delta)
items.append(obj)
lasttime = d
for l in items:
if (l[2].total_seconds() > 3):
print(l[2], l[0], l[1])
Some ideas for github actions.
Organizing terminal output
I've noticed some github actions use a special tag to collapse actions output so we can expand clicking on an arrow like this: this tags are
Investigating slow steps
I'm sharing one quick script made in python to analyse logs and discover the most slow steps in actions in this case it is set to only show entries that takes more than 3 seconds to execute