-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature/custom metrics #14
Feature/custom metrics #14
Conversation
I'm currently having an issue with this implementation. For some reason when I call
|
I'm on vacation, I'll get back to you once I am back. |
select { | ||
case resp = <-c.hopIds[hopByHopID]: | ||
case resp := <-c.hopIds[hopByHopID]: | ||
now := time.Now() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be made slightly more efficient:
now := time.Now()
c.reportMetric(c.metrics.RequestDuration, now, metrics.D(now.Sub(sentAt)))
c.reportMetric(c.metrics.RequestCount, now, 1)
@luissimas Regarding |
I'm not sure what's happening either, but it seems to work with: console.log("CCA: ", cca.string())
console.log(`CCA: ${cca}`) |
Agreed. After some thought I think that the current |
Yes, explicitly converting the object to a string seems to work on my end as well. I've updated the docs to show working examples. Would you consider this a block for merging this PR? |
Thank you for your contribution! |
Hello!
This is a proposal for the implementation of custom metrics for this extension. As described in #13, currently there are no custom metrics for the Diameter protocol. It would be valuable to provide metrics regarding request latency and the number of requests handled per second, as those are key results that cannot be properly expressed by the default VU metrics (specially in test scenarios where we issue multiple requests to the server, such as in a SIP authentication flow).
My proposal is to add the following metrics (I've marked the ones that are already implemented by this PR):
diameter_req_count
to track the number of requests handled during the testdiameter_req_duration
to track the response time of each individual requestdiameter_req_failed
to track the rate of failed requests.In this case it would be nice to provide an API similar to HTTP's setResponseCallback to allow the user to define what is a failure responseWith that said, this implementation requires some refactoring in the way that we export the modules to the JavaScript runtime, and I'm not very familiar with this API.
I'd like to know what you guys think about the proposal and also the design of the implementation.
Before
After