grafana / xk6-dashboard

A k6 extension that makes k6 metrics available on a web-based dashboard.
GNU Affero General Public License v3.0
330 stars 30 forks source link

Communicate to the user why k6 hangs at the end of the test #152

Open oleiade opened 7 months ago

oleiade commented 7 months ago

Enhancement Description

Currently, when using the dashboard in k6, once a test is over, k6 hangs for a while to allow users to consult the dashboard still and save the report.

I've noticed that as it does, it doesn't communicate that in any way to the user and leaves k6 hanging. This scenario happened to me the other day, and I intuitively didn't remember that k6 was supposed to turn. This leads me to think we could do a better job at either communicating it or modifying the extension in a way that doesn't make this behavior necessary anymore somehow (it probably would need some investigation/product/design thinking there and wouldn't be my short-term preference).

k6 is hanging to keep the dashboard available, but as a user, I don't know that CleanShot 2024-01-22 at 11 00 14

Suggested Solution (optional)

No response

Already existing or connected issues / PRs (optional)

No response

oleiade commented 7 months ago

Potential solutions

Command-line message

Tell the user that k6 is lingering/waiting to let the user do something: dashboard, report, etc...

linger

Consider dropping this feature from the dashboard itself, and rely on the k6 --linger command-line flag instead (which is a known behavior).

We should experiment with the linger option to figure how we handle that behavior on the k6 side itself, before committing to anything.

Side note: extensions could be allowed to request lingering from k6. An extension signal it wants to keep running k6, and k6 would alert the user, and manage the behavior.

PS: same problem on k6 side