Make HTTP/1.1 startline parsing "safe"#20885
Conversation
|
@aspnet-hello benchmark |
|
Starting 'Default' pipelined plaintext benchmark with session ID '56b8c19e4bba4094b5e2fa8c684ae99d'. This could take up to 30 minutes... |
BaselinePR |
There was a problem hiding this comment.
HttpVersionAndMethod contains 3 parts
int MethodEnd { get; set; }
HttpVersion Version { get; }
HttpMethod Method { get; }To fit in a long HttpMethod can't be an int
There was a problem hiding this comment.
Any api changes are all to .Internal ones
86ee27b to
c9d75f5
Compare
|
@aspnet-hello benchmark |
Random IIS test failure (bad cert) on the previous run. |
|
Starting 'Default' pipelined plaintext benchmark with session ID 'a9961ac6b9dd4df8a020c1ddaecc14e0'. This could take up to 30 minutes... |
BaselinePR |
|
Still good 🙂 if larger 😢 |
c50117a to
a89d1f5
Compare
a89d1f5 to
e088a5f
Compare
|
RequestParsingBenchmark Http1ConnectionBenchmark |
|
@aspnet-hello benchmark |
|
@benaadams could you please run the JSON microbenchmark as well? |
Made the Results: |
|
Error seems to be build out of memory issue? |
@benaadams Awesome, thank you! It means that if we were spending 5% of total time in parsing, with the 20% improvement we are going to get an extra 1% gain in RPS, which should translate to 10k as of today. |
| [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]public TargetOffsetPathLength(int offset, int length, bool isEncoded) { throw null; } | ||
| public bool IsEncoded { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]get { throw null; } } | ||
| public int Length { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]get { throw null; } } | ||
| public int Offset { [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]get { throw null; } } |
There was a problem hiding this comment.
@davidfowl @rynowak The HttpParser and associated types are the last remaining "pubternal" APIs in Kestrel. They are used in our TE "platform" benchmarks. Is it okay to bypass API review for this?
There was a problem hiding this comment.
We do need to design an API though....
There was a problem hiding this comment.
What? You don't love TargetOffsetPathLength!?
There was a problem hiding this comment.
I assume he means to expose it as external api?
|
Starting 'Default' pipelined plaintext benchmark with session ID '4606a59255514add9011ac69204820a6'. This could take up to 30 minutes... |
BaselinePR |
halter73
left a comment
There was a problem hiding this comment.
This is awesome! Both "safe" PRs have been really good. It's nice to prove we don't need pointers to be fast anymore.
|
Platform change for this PR in aspnet/benchmarks aspnet/Benchmarks#1497 |
|
Is there some way we can give dotnet/runtime the ability to run asp.net benchmarks like you're doing here? |
I assume you mean like the request to @aspnet-hello benchmark ? |
|
@AndyAyersMS there are many ways to interpret this, please chat with me offline |
|
@AndyAyersMS everyone should have it, it's amazing 😄 |
To @blowdart with ❤
Contributes to #4720
HttpParserBenchmark
RequestParsingBenchmark
Http1ConnectionBenchmark
Note: this will require a corresponding change to the Platform versions due to change in internal api
Resolves: #20518
/cc @davidfowl @adamsitnik