grafana / xk6-dashboard

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

Add a HTML export functionality #46

Closed oleiade closed 12 months ago

oleiade commented 1 year ago

This project aims to provide k6 with the ability to produce an HTML report at the end of the test run, offering a visual overview of the performance insights observed during the test run.

This project starts as a feature of the xk6-dashboard project but is meant to become a core feature of k6 eventually.

### Next steps
- [x] Moving the project into the Grafana organization
- [x] [#37](https://github.com/szkiba/xk6-dashboard/issues/37)
- [ ] Put together a Proof of Concept of the HTML Report generation feature
- [ ] Implement and Stabilize the feature into the dashboard project
- [ ] Sync with internal teams to align the look & feel as well as tech stack with k6

Design

In its first proof of concept iteration, the project works as follows:

  1. During the k6 test run, the extension collects the metrics data periodically.
  2. As data is collected, they are accumulated in a JSON data file.
  3. The HTML report is a single HTML file that interactively loads and transforms this data to fill the charts.

Image

Eventually, we expect the final version to generate an output HTML file with the data already embedded in it instead of fetching it from a file.

Image

Implementation considerations

The report will consist of a single file holding the compressed data and graphs displaying those data.

The sample size will be 10s, which will lead to a bigger data set. Later we could increase it to reduce the size. The optimization might not be worth it, considering the alternative PDF export would be much bigger anyway.

Starting size of the report is expected to be ~80Kb + data for the report itself. We expect

Question & TODOS

szkiba commented 12 months ago

Fixed in v0.5.0 and in v0.6.0