Kesin11/actions-timeline

Would it possible to disable waiting time calculation?

xihajun opened this issue · 7 comments

Thanks for the tool! It is quite useful! I wonder would it possible to hide the job waiting time?

@xihajun
Are you refering to the Waiting for a runner span in Gantt?
Currently not, but it might be possible with additional options.

Can you tell me why you want to disable it?

Hi @Kesin11, in a lot of cases, I think the waiting time is not important? We would care more about the actual running time instead?

@xihajun
I use a self-hosted runner running on EC2, which can take a few seconds for a job to start or over a minute.
In these situations I need to take into account the time spent waiting for the runner when analysing the job.
If you are using a runner hosted by GitHub, I understand that you do not need to consider this as the waiting time is short enough.

I just hand-crafted a sample Gantt chart that does not include waiting times. Is this what you would like it to look like?

Current

gantt
title CI
dateFormat  HH:mm:ss
axisFormat  %H:%M:%S
section test
Waiting for a runner (7s) :active, job0-0, 00:00:16, 7s
Set up job (0s) :job0-1, after job0-0, 0s
Run actions/checkout@v4 (0s) :job0-2, after job0-1, 0s
Run /./.github/actions/setup-deno-with-cache (6s) :job0-3, after job0-2, 6s
Run deno test (5s) :job0-4, after job0-3, 5s
CLI somke test (2s) :job0-5, after job0-4, 2s
Post Run /./.github/actions/setup-deno-with-cache (0s) :job0-6, after job0-5, 0s
Post Run actions/checkout@v4 (0s) :job0-7, after job0-6, 0s
Complete job (0s) :job0-8, after job0-7, 0s
section check
Waiting for a runner (5s) :active, job1-0, 00:00:16, 5s
Set up job (0s) :job1-1, after job1-0, 0s
Run actions/checkout@v4 (0s) :job1-2, after job1-1, 0s
Run /./.github/actions/setup-deno-with-cache (4s) :job1-3, after job1-2, 4s
Run deno fmt --check (0s) :job1-4, after job1-3, 0s
Run deno lint (0s) :job1-5, after job1-4, 0s
Post Run /./.github/actions/setup-deno-with-cache (0s) :job1-6, after job1-5, 0s
Post Run actions/checkout@v4 (0s) :job1-7, after job1-6, 0s
Complete job (0s) :job1-8, after job1-7, 0s
section check-dist
Waiting for a runner (5s) :active, job2-0, 00:00:17, 5s
Set up job (2s) :job2-1, after job2-0, 2s
Run actions/checkout@v4 (0s) :job2-2, after job2-1, 0s
Run /./.github/actions/setup-deno-with-cache (9s) :job2-3, after job2-2, 9s
Rebuild the dist/ directory (10s) :job2-4, after job2-3, 10s
Upload dist for post job (0s) :job2-5, after job2-4, 0s
Create dist/*.js size json (0s) :job2-6, after job2-5, 0s
Create dummy coverage (0s) :job2-7, after job2-6, 0s
Run k1LoW/octocov-action@v1 (4s) :job2-8, after job2-7, 4s
Post Run /./.github/actions/setup-deno-with-cache (1s) :job2-9, after job2-8, 1s
Post Run actions/checkout@v4 (0s) :job2-10, after job2-9, 0s
Complete job (0s) :job2-11, after job2-10, 0s
section run_self
Waiting for a runner (6s) :active, job3-0, 00:00:51, 6s
Set up job (1s) :job3-1, after job3-0, 1s
Download bundled dist (2s) :job3-2, after job3-1, 2s
Run self action (0s) :job3-3, after job3-2, 0s
Loading

Not include waiting times.

gantt
title CI
dateFormat  HH:mm:ss
axisFormat  %H:%M:%S
section test
Set up job (0s) :job0-1, 00:00:23, 0s
Run actions/checkout@v4 (0s) :job0-2, after job0-1, 0s
Run /./.github/actions/setup-deno-with-cache (6s) :job0-3, after job0-2, 6s
Run deno test (5s) :job0-4, after job0-3, 5s
CLI somke test (2s) :job0-5, after job0-4, 2s
Post Run /./.github/actions/setup-deno-with-cache (0s) :job0-6, after job0-5, 0s
Post Run actions/checkout@v4 (0s) :job0-7, after job0-6, 0s
Complete job (0s) :job0-8, after job0-7, 0s
section check
Set up job (0s) :job1-1, 00:00:21, 0s
Run actions/checkout@v4 (0s) :job1-2, after job1-1, 0s
Run /./.github/actions/setup-deno-with-cache (4s) :job1-3, after job1-2, 4s
Run deno fmt --check (0s) :job1-4, after job1-3, 0s
Run deno lint (0s) :job1-5, after job1-4, 0s
Post Run /./.github/actions/setup-deno-with-cache (0s) :job1-6, after job1-5, 0s
Post Run actions/checkout@v4 (0s) :job1-7, after job1-6, 0s
Complete job (0s) :job1-8, after job1-7, 0s
section check-dist
Set up job (2s) :job2-1, 00:00:22, 2s
Run actions/checkout@v4 (0s) :job2-2, after job2-1, 0s
Run /./.github/actions/setup-deno-with-cache (9s) :job2-3, after job2-2, 9s
Rebuild the dist/ directory (10s) :job2-4, after job2-3, 10s
Upload dist for post job (0s) :job2-5, after job2-4, 0s
Create dist/*.js size json (0s) :job2-6, after job2-5, 0s
Create dummy coverage (0s) :job2-7, after job2-6, 0s
Run k1LoW/octocov-action@v1 (4s) :job2-8, after job2-7, 4s
Post Run /./.github/actions/setup-deno-with-cache (1s) :job2-9, after job2-8, 1s
Post Run actions/checkout@v4 (0s) :job2-10, after job2-9, 0s
Complete job (0s) :job2-11, after job2-10, 0s
section run_self
Set up job (1s) :job3-1, 00:00:57, 1s
Download bundled dist (2s) :job3-2, after job3-1, 2s
Run self action (0s) :job3-3, after job3-2, 0s
Loading

Hi @Kesin11, sorry, I missed your reply! yes, that is what I expected. I think I can also grap and have hand-crafted chart after generating it. That could be a good idea! Thanks!!

@xihajun
I hand crafted the mocks because I wanted you to check them out before implementation.
If you are satisfied with the mock, I will implement the show_waiting_runner: false option when I have free time. Or you can create a pull-request and I will be happy to review it.

@xihajun
I implemented show-waiting-runner option and released v2.2.0. Please try it!

@xihajun
I implemented show-waiting-runner option and released v2.2.0. Please try it!

Thanks a lot!!