Replies: 1 comment
-
Try this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have an ASP.NET core 2.2 pipeline with about a dozen middlewares registered in the pipeline. In my first outer middleware I have code that basically calls the inner middleware and logs the time that it takes. It basically does this:
This gives me
completePipelineDuration
.Then, in my controller, I log the elapsed time spent in the controller as well. This gives me
controllerDuration
.I have then observed occurences where
completePipelineDuration
is close to 3 seconds andcontrollerDuration
is close to 1 second. It therefore means that I have about 2 seconds that is being spend in my dozen of APS.NET Core middlewares.So my question is this: is there a way to have metrics on how long it took to execute each middleware? I am trying to find out which piece of code is responsible for the performance issue.
Beta Was this translation helpful? Give feedback.
All reactions