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
{{ message }}
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.
On Node.js webapps it's very common to have async functions running in parallel, for example, I can send a HTTP request to two endpoints at the same time and when I got the response from both, I render the view.
app.get('/',(req,res)=>{async.parallel([request.bind(this,'http://jsonip.com'),request.bind(this,'http://jsonip.com')//just suppose it's a different endpoint],function(err,results){res.render('index');});});
MiniProfiler is correctly recording timing for both requests, but the UI is showing the sum of durations.
I want to make a PR for this, but first I'd like to get you opinion on what should be done here.
Using the example above, the correct shown duration should be 429.9ms.
We can complicate it even more with a scenario like this:
Request 1 - Started at 10ms with duration of 400ms
Request 2 - Started at 200ms with duration of 300ms.
The text was updated successfully, but these errors were encountered:
miniprofiler doesn't do parallel stuff well at all. It was initially written years ago for C# where that wasn't really a thing. We should use gantt charts like app stats does (https://googleappengine.blogspot.com/2010/03/easy-performance-profiling-with.html). This would require a fair amount of work on the frontend. I think the backends could stay the same.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
On Node.js webapps it's very common to have async functions running in parallel, for example, I can send a HTTP request to two endpoints at the same time and when I got the response from both, I render the view.
MiniProfiler is correctly recording timing for both requests, but the UI is showing the sum of durations.
I want to make a PR for this, but first I'd like to get you opinion on what should be done here.
Using the example above, the correct shown duration should be 429.9ms.
We can complicate it even more with a scenario like this:
Request 1 - Started at 10ms with duration of 400ms
Request 2 - Started at 200ms with duration of 300ms.
The text was updated successfully, but these errors were encountered: