canonical / jhack

Chock-full of Juju hackery.
Apache License 2.0
48 stars 23 forks source link

'jhack tail' is slow to stop after tailing for some time (20 charms, 100+ events, 20 mins) #163

Open taurus-forever opened 1 month ago

taurus-forever commented 1 month ago

Hi,

After deploying test bundle and jhack tailing the process it is slow to abort jhack, the ^C takes time and bring to the another jhack output (all columns shown this time) which you need to abort with another ^C and it takes time, see the recording with speedup:

Screencast from 2024-06-03 23-39-34.webm

PietroPasotti commented 1 month ago

I think that's because it's processing so many events. Is "20 mins" the time it took to close tail (that'd be a lot), or the lifetime of the test model you were deploying?

taurus-forever commented 1 month ago

The closing time is 1-2 mins in the worst case... but annoying and visible. It looks like it is doing some internal calculations... as more column shown. Why those calculations necessary?

PietroPasotti commented 1 month ago

those calculations are needed to print out the final 'full table', listing all captured events from the start of the session up to when you close it. If you pass --output ./foo.txt the full table will be printed to file, otherwise it will be printed to console. If it's annoying I can disable it (it will still take longer with --output)

taurus-forever commented 1 month ago

if no --output passed, can you skip the final calculations and exit? :-)

If it's annoying I can disable it (it will still take longer with --output)

It is necessary when necessary... otherwise fast.

PietroPasotti commented 1 month ago

yeah, thought it'd be nice to see the full summary even without --output, didn't think it'd take annoyingly long on regular runs.