MATRIXXSoftware / xk6-diameter

A k6 extension for Diameter protocol
MIT License
20 stars 6 forks source link

Custom metrics #13

Closed luissimas closed 11 months ago

luissimas commented 11 months ago

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 commented 11 months ago

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.

lwlee2608 commented 11 months ago

Implemented in #14