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

Custom metrics #13

Closed
luissimas opened this issue Dec 4, 2023 · 2 comments
Closed

Custom metrics #13

luissimas opened this issue Dec 4, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@luissimas
Copy link
Contributor

Hello!

From my understanding, currently the extension provides no custom metrics. When I execute a test I get the following output:

image

I'd like to be able to gather metrics around the latency of requests and the number of requests made during the test. The final goal is to be able to extract information about the latency's p(90), p(95), p(99) and the RPS. Is this on the roadmap of the project? If not, would it be possible to implement such feature?

I'll look into the K6 metrics API and start experimenting with it, but I'd love to hear your thoughts on this.

@luissimas
Copy link
Contributor Author

I was able to hack something together that looks like this:

image

I'll probably open a draft PR so we can better discuss the implementation. I think a good addition to that would be to add a metric similar to HTTP's http_req_failed with the option for the user to define how to determine if a request was successful or not, probably an API like HTTP's setResponseCallback.

@luissimas luissimas mentioned this issue Dec 4, 2023
3 tasks
@lwlee2608
Copy link
Contributor

Implemented in #14

@lwlee2608 lwlee2608 added the enhancement New feature or request label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants