Skip to content

output compile time for each sketch #59

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

Closed
2bndy5 opened this issue Apr 17, 2022 · 2 comments · Fixed by #61
Closed

output compile time for each sketch #59

2bndy5 opened this issue Apr 17, 2022 · 2 comments · Fixed by #61
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@2bndy5
Copy link
Contributor

2bndy5 commented Apr 17, 2022

I had a thought that might be useful for workflow maintainers: Output the time it takes to compile an individual sketch. It might also instigate optimization for sketches that take longer to compile, but that is subject to sketch author's intentions.

There's currently no way of looking at a completed workflow's log and determine which sketch(s) cost more minutes (rather important for private repos). Compared to PlatformIO's CI capability, each sketch is compiled separately as individual jobs, thus the compile time is displayed as part of the job's runtime (not an exact measurement but helpful). Furthermore, PIO output does include how long it took to compile a sketch. Since this action compiles several sketches in 1 job, the job's runtime is cumulative and less representative of an individual sketch's compile time.

@2bndy5
Copy link
Contributor Author

2bndy5 commented Apr 17, 2022

It could be argued that this idea belongs in the arduino CLI offerings. I don't see a way to do this on that end though.

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Apr 17, 2022
@per1234 per1234 self-assigned this Apr 17, 2022
@per1234
Copy link
Collaborator

per1234 commented Apr 17, 2022

Thanks for your suggestion @2bndy5.

It could be argued that this idea belongs in the arduino CLI

It could certainly be done in Arduino CLI, but I think the feature has less value for those who use Arduino CLI directly because It is fairly easy for them to time the arduino-cli compile command duration on their own (e.g., using the time command).

As you point out, the workflow step that runs the action will often be used to compile multiple sketches. Even if you configured your workflow to only compile one sketch per job, the step run time displayed in the logs includes the dependencies installation overhead. So this is something that is not easy to achieve from outside the action (the raw workflow run logs provided by GitHub Actions do contain timestamps, so it is possible to get the compilation times, but certainly not convenient).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants