-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Performance analysis of IPipelineBehavior for validation #813
Comments
try this, do not use await
|
@neozhu I tried but it doesn't affect with a big difference |
If you're throwing a lot of exceptions during your stress-test than I would suspect that to be the culprit |
I made the test in the happy path case so it means I don't throw any exceptions. 🤔 |
What work is actually being performed in your handler? At just 3ms i'd be curious if you are actually reading / writing anything out of process. I did a quick investigation into the perf impact of using something similar for both validation and logging some time back but after benchmarking found that if my handler was performing an out of process action like reading or writing to a database, cache or filesystem then the impact of the pipeline components was almost imperceptable compared to the overall duration (ie XXms for handler and XXXus for the pipeline). This is inline with what Jimmy says more succintly here:
|
See #828 , it might help with this as I won't register the built-in behaviors if they're not needed |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stalled for 14 days with no activity. |
I use
IPipelineBehavior
withFluentValidation
for validating my requests.Most of us probably already use
ValidationBehavior
like CleanArchitecture sampleBut when I made a load test. I can receive three times as many responses without this pipeline behavior.
Example:
With

IPipelineBehavior
Without

IPipelineBehavior
I used k6 for load testing.
Is this expected result or are there any suggestions to make it better?
Here is my
ValidationBehavior
classThe text was updated successfully, but these errors were encountered: