Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[actions] ideas #7942

Open
2 of 4 tasks
dimitre opened this issue May 9, 2024 · 1 comment
Open
2 of 4 tasks

[actions] ideas #7942

dimitre opened this issue May 9, 2024 · 1 comment

Comments

@dimitre
Copy link
Member

dimitre commented May 9, 2024

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

##[group] arrow title goes here
##[endgroup]
Screenshot 2024-05-09 at 13 07 26

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

#!/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])
@dimitre
Copy link
Member Author

dimitre commented May 11, 2024

closed by #7947

@dimitre dimitre closed this as completed May 11, 2024
@dimitre dimitre reopened this May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant