You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now sui-perf provides an integration to get superagent requests timings.
We want to add support for Axios
Steps to Reproduce
Expected behavior: Get time marks on axios requests
Actual behavior:
I've made a very quick'n dirt implementation but I've noticed that since they are promises and two promises can be spawned at the same time but resolved in any order, this libs groups them as one call as child of the other one (like with react components)
Example:
/example1 request is performed (perf.mark(/example1)
/example2 request is performed (perf.mark(/example2))
/example2 request done (perf.stop(/example2)
/example1 request done (perf.stop(/example1)
This will be reported as example2 being a child of example1 when the requests are independent to each other.
In my mind this should also happen to superagent implementation on events, but I didn't test it.
The text was updated successfully, but these errors were encountered:
It's not really reported as a child. It reports each line separately. It can look as a child because example2 begins after example1. Do you mean that example2 in the graph finishes before example 1 ??? It's should not happen.
The only thing that worries me with this integration is what already happens with super-agent. It's because the integration decorates superagent singleton instance. So, in node, we can't really know which page request actually generated API requests.
A way to avoid it is a façade instance of axios or super agent per request, but we would have to modify the domain for that.
sui-perf
sui-perf
Description
Right now sui-perf provides an integration to get superagent requests timings.
We want to add support for Axios
Steps to Reproduce
Expected behavior: Get time marks on axios requests
Actual behavior:
I've made a very quick'n dirt implementation but I've noticed that since they are promises and two promises can be spawned at the same time but resolved in any order, this libs groups them as one call as child of the other one (like with react components)
Example:
/example1 request is performed (perf.mark(/example1)
/example2 request is performed (perf.mark(/example2))
/example2 request done (perf.stop(/example2)
/example1 request done (perf.stop(/example1)
This will be reported as example2 being a child of example1 when the requests are independent to each other.
In my mind this should also happen to superagent implementation on events, but I didn't test it.
The text was updated successfully, but these errors were encountered: