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

Emit vus and vus_max metrics per scenario #1833

Open
imiric opened this issue Feb 1, 2021 · 2 comments
Open

Emit vus and vus_max metrics per scenario #1833

imiric opened this issue Feb 1, 2021 · 2 comments
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature

Comments

@imiric
Copy link
Contributor

imiric commented Feb 1, 2021

Some users are expecting thresholds for vus and vus_max metrics to work defined on specific scenarios, e.g. 'vus{scenario:example}': ['value>30'].

This is currently not possible since those metrics are emitted at the engine level: https://github.com/loadimpact/k6/blob/586cd110358a55f5dff3c1dc88c1980e8f71a7ea/core/engine.go#L340-L362

Feature Description

vus and vus_max should be emitted as part of executors and tagged the same way as all other metrics.

@imiric imiric added feature lower prio evaluation needed proposal needs to be validated or tested before fully implementing it in k6 labels Feb 1, 2021
@na-- na-- changed the title Emit vus and vus_max metrics per scenario Emit vus and vus_max metrics per scenario Apr 19, 2021
@Blinkuu
Copy link
Contributor

Blinkuu commented Jan 11, 2023

This issue is becoming more important now, as the @grafana/k6-frontend team introduced new per-scenario overviews to the k6 Grafana Plugin.

The conversation around this has also popped up a couple of times recently. First, I found the per-scenario overview to be a bit confusing, as we always plot the VU metric, regardless of the scenario we examine in the k6 Grafana Plugin. Second, the issue was also brought up by @ka3de during his WOLT presentation.

@na-- na-- removed the lower prio label Feb 27, 2023
@na--
Copy link
Member

na-- commented Feb 27, 2023

To be clear, at this point we probably can't change this behavior without it being a major breaking change. Besides, since vus and vus_max are Gauges, emitting wildly different values just with a different scenario tag will have a very weird behavior in the current k6... 😞

Whenever we try to tackle this, we should probably do it by adding a new metric, e.g. scenario_vus or something like that. How that is going to be handled in the end-of-test summary or with distributed execution (#140) is still a bit of a unknown 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evaluation needed proposal needs to be validated or tested before fully implementing it in k6 feature
Projects
None yet
Development

No branches or pull requests

3 participants