Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi folks 👋🏻
Per our recent discussion, I'm presenting a draft PR (intended for review, not for merging) that replicates the xk6-dashboard experience using Grafana.
I've added a /grafana directory at the project root. This directory houses a docker-compose file and the necessary Grafana and Prometheus configurations to simplify setup.
How-to
Upon starting the docker-compose stack and initiating the k6 command, navigate to http://localhost:3000. You'll find a pre-configured xk6-dashboard Grafana dashboard:
Caveats & Assistance Requested
While I've managed to closely replicate the xk6-dashboard experience, I faced certain challenges. If you possess insights or potential solutions, please consider contributing directly to this branch. Here are the main challenges:
The k6 dashboard conveniently sets its range based on the test start time. However, in Grafana, you'll need to set this manually. Record the test's start time and adjust the From time range accordingly, e.g., 2023-09-06 15:19:30. Set the To field to now.
Set a refresh rate of 10s to align with the xk6 dashboard.
I've struggled to reproduce the table found in the xk6 dashboard's summary screen. Grafana's tables are, frankly, quite perplexing. Any guidance or direct adjustments would be greatly appreciated.
This branch utilizes k6's Prometheus-remote-write feature. The provided command is configured to emit Trend metrics as specific Prometheus summaries (k6_avg, k6p90, and k6*_p95). This is handy for some graphs but complicates the accurate representation of others, particularly the HTTP request rate.