Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a prefix to the browser module metrics #883

Closed
ankur22 opened this issue May 15, 2023 · 1 comment · Fixed by #903
Closed

Add a prefix to the browser module metrics #883

ankur22 opened this issue May 15, 2023 · 1 comment · Fixed by #903
Assignees
Labels
breaking PRs that need to be mentioned in the breaking changes section of the release notes refactor
Milestone

Comments

@ankur22
Copy link
Collaborator

ankur22 commented May 15, 2023

The browser module emits metrics. One such metric(s) are http ones. k6 itself emits http metrics when users use the http module.

The implementation of the http client in the http module vs what the browser modules users differs which can result in different measurements. This will affect aggregations across the http metrics.

Users are likely to want to measure and analyse the http metrics from the http module and browser module separately rather than aggregated together too.

There maybe other such metrics where there's a clash between what the browser module emits and what existing k6 modules emit.

We feel that it's best to rename the existing browser module metrics so that we avoid this clash and allow a more flexible way of measuring and analysing metrics from different modules.

So, for this issue, we need to prefix the existing emitted metrics from the browser module with browser_ where we're not already doing so.

@ankur22 ankur22 added refactor breaking PRs that need to be mentioned in the breaking changes section of the release notes labels May 15, 2023
@ankur22 ankur22 added this to the v0.10.0 milestone May 15, 2023
@ankur22 ankur22 self-assigned this May 15, 2023
@ankur22
Copy link
Collaborator Author

ankur22 commented May 17, 2023

At the moment it seems that k6 seems to continue to report on builtin k6 metrics even if the browser module isn't using them. I've created a new browser_data_sent metric in the browser module (a clone of the data_sent metric in the k6 module), and in the test summary we see this now:

     browser_data_sent.........................: 2.6 kB  1.6 kB/s
     ...
     data_sent.................................: 0 B     0 B/s
     ...

We need to find a way to stop the metrics that aren't used from being displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking PRs that need to be mentioned in the breaking changes section of the release notes refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant