Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Newton-King <james@newtonking.com>2022-04-04 03:25:35 +0300
committerJames Newton-King <james@newtonking.com>2022-04-04 03:25:35 +0300
commit8b429209e88ed236c9ba2c3609d02eab9fa3eb36 (patch)
tree1e16440b7622b4d2c7a3206c91ed4fce39e13ad6
parent88e003dbb2823186ce9b84270bb5ef47cf3b2e2c (diff)
-rw-r--r--src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs
index dd96c2d126..8f03e5013e 100644
--- a/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs
+++ b/src/Servers/Kestrel/perf/Microbenchmarks/Http2/Http2FrameWriterBenchmark.cs
@@ -20,7 +20,6 @@ public class Http2FrameWriterBenchmark
private Pipe _pipe;
private Http2FrameWriter _frameWriter;
private HttpResponseHeaders _responseHeaders;
- private Http2Stream _stream;
[GlobalSetup]
public void GlobalSetup()
@@ -46,8 +45,6 @@ public class Http2FrameWriterBenchmark
_memoryPool,
serviceContext);
- _stream = new MockHttp2Stream(TestContextFactory.CreateHttp2StreamContext(streamId: 0));
-
_responseHeaders = new HttpResponseHeaders();
var headers = (IHeaderDictionary)_responseHeaders;
headers.ContentType = "application/json";
@@ -57,7 +54,7 @@ public class Http2FrameWriterBenchmark
[Benchmark]
public void WriteResponseHeaders()
{
- _frameWriter.WriteResponseHeaders(_stream, 200, endStream: true, _responseHeaders);
+ _frameWriter.WriteResponseHeaders(streamId: 0, 200, Http2HeadersFrameFlags.END_STREAM, _responseHeaders);
}
[GlobalCleanup]
@@ -66,16 +63,4 @@ public class Http2FrameWriterBenchmark
_pipe.Writer.Complete();
_memoryPool?.Dispose();
}
-
- private class MockHttp2Stream : Http2Stream
- {
- public MockHttp2Stream(Http2StreamContext context)
- {
- Initialize(context);
- }
-
- public override void Execute()
- {
- }
- }
}