[GH-ISSUE #2659] How to Retrieve Execution Time for Each Job in Act #1201

Closed
opened 2026-03-01 21:49:39 +03:00 by kerem · 3 comments
Owner

Originally created by @Betty1202 on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2659

Act version

v0.2.74

Feature description

Hello,

I am using Act to run GitHub Actions locally, and I am wondering if there is a way to obtain the execution time for each job, similar to what is displayed on the GitHub Actions web interface. For example, the web interface provides a detailed breakdown of the execution time for each step within a job, as shown in the attached screenshot.

Image

Is there a feature or workaround in Act that allows us to capture or display this information? Any guidance on how to achieve this would be greatly appreciated.

Thank you!

Originally created by @Betty1202 on GitHub (Feb 11, 2025). Original GitHub issue: https://github.com/nektos/act/issues/2659 ### Act version v0.2.74 ### Feature description Hello, I am using Act to run GitHub Actions locally, and I am wondering if there is a way to obtain the execution time for each job, similar to what is displayed on the GitHub Actions web interface. For example, the web interface provides a detailed breakdown of the execution time for each step within a job, as shown in the attached screenshot. ![Image](https://github.com/user-attachments/assets/ed7cbb2c-02b7-472b-a030-23dcb9160c00) Is there a feature or workaround in Act that allows us to capture or display this information? Any guidance on how to achieve this would be greatly appreciated. Thank you!
kerem 2026-03-01 21:49:39 +03:00
Author
Owner

@ChristopherHX commented on GitHub (Feb 11, 2025):

See https://github.com/nektos/act/issues/2660#issuecomment-2652003109

json logs contains timestamp + start + stop of jobs and steps

<!-- gh-comment-id:2652007619 --> @ChristopherHX commented on GitHub (Feb 11, 2025): See https://github.com/nektos/act/issues/2660#issuecomment-2652003109 json logs contains timestamp + start + stop of jobs and steps
Author
Owner

@Betty1202 commented on GitHub (Feb 12, 2025):

Got it. Thanks!

<!-- gh-comment-id:2653007097 --> @Betty1202 commented on GitHub (Feb 12, 2025): Got it. Thanks!
Author
Owner

@nobuto-m commented on GitHub (Feb 17, 2025):

I had a similar question and I ended up with a quick hack to print the output of time at the end of each step.

defaults:
  run:
    shell: bash -e -c "/usr/bin/time -f \"\nStep total time:\t%E\" bash -ex {0}"

bash -e -c can be omitted for simplicity. However, actionlint doesn't enable shellcheck if the shell starts with the time command so double bash is a hack to take a balance of both.

<!-- gh-comment-id:2663470418 --> @nobuto-m commented on GitHub (Feb 17, 2025): I had a similar question and I ended up with a quick hack to print the output of `time` at the end of each step. ```yaml defaults: run: shell: bash -e -c "/usr/bin/time -f \"\nStep total time:\t%E\" bash -ex {0}" ``` `bash -e -c` can be omitted for simplicity. However, [actionlint](https://github.com/rhysd/actionlint) doesn't enable shellcheck if the shell starts with the time command so double bash is a hack to take a balance of both.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1201
No description provided.