kataras / server-benchmarks

:rocket: Cross-platform transparent benchmarks for HTTP/2 Web Servers at 2020-2024
MIT License
91 stars 7 forks source link

Kestrel - migration to middlewares #2

Closed NikitaFlimakov closed 1 year ago

kataras commented 4 years ago

Hello @NikitaFlimakov, the parameterized code you try to push is not the way-to-go for path parameters, you strip from the request path which is not a valid option. The code in these tests should be used in production, like the rest of the web frameworks. Please restore it at its original state. I see the remove header value, which is a reasonable modification and we should proceed with it.

NikitaFlimakov commented 4 years ago

Hi @kataras, thank you for explanation. I've fixed parameterized test for kestrel

kataras commented 4 years ago

No problem @NikitaFlimakov, you have more to fix yet... In the parameterized and static tests, you pre-allocate the response body at: https://github.com/kataras/server-benchmarks/pull/2/files#diff-29f8c41b8135fd55c22535de5bb8d252R9 and https://github.com/kataras/server-benchmarks/pull/2/files#diff-e467684229009336fdd14e55e5aa5e94R18 while in other web frameworks, e.g. Iris the body is inside the request handler itself: https://github.com/kataras/server-benchmarks/blob/7f347a73c6bdade9f54360a2af43fa20c061db9e/_code/parameterized/iris/main.go#L8

Please make sure that your changes are used in production, don't try to pre-allocate things just to make .NET Core run faster, it's not fair for other languages and frameworks that are allocating them in serve-time.

NikitaFlimakov commented 4 years ago

I've tried to fix all issues