44using System . Buffers ;
55using System . IO . Pipelines ;
66using BenchmarkDotNet . Attributes ;
7+ using Microsoft . AspNetCore . Server . Kestrel . Core ;
78using Microsoft . AspNetCore . Server . Kestrel . Core . Internal . Http ;
89using Microsoft . AspNetCore . Server . Kestrel . Core . Internal . Http2 ;
910using Microsoft . AspNetCore . Server . Kestrel . Core . Internal . Http2 . FlowControl ;
1011using Microsoft . AspNetCore . Server . Kestrel . Core . Internal . Infrastructure ;
12+ using Microsoft . AspNetCore . Testing ;
1113using Microsoft . Extensions . Logging . Abstractions ;
1214
1315namespace Microsoft . AspNetCore . Server . Kestrel . Microbenchmarks
@@ -27,6 +29,12 @@ public void GlobalSetup()
2729 var options = new PipeOptions ( _memoryPool , readerScheduler : PipeScheduler . Inline , writerScheduler : PipeScheduler . Inline , useSynchronizationContext : false ) ;
2830 _pipe = new Pipe ( options ) ;
2931
32+ var serviceContext = TestContextFactory . CreateServiceContext (
33+ serverOptions : new KestrelServerOptions ( ) ,
34+ httpParser : new HttpParser < Http1ParsingHandler > ( ) ,
35+ dateHeaderValueManager : new DateHeaderValueManager ( ) ,
36+ log : new MockTrace ( ) ) ;
37+
3038 _frameWriter = new Http2FrameWriter (
3139 new NullPipeWriter ( ) ,
3240 connectionContext : null ,
@@ -36,7 +44,7 @@ public void GlobalSetup()
3644 minResponseDataRate : null ,
3745 "TestConnectionId" ,
3846 _memoryPool ,
39- new Core . Internal . ServiceContext ( ) ) ;
47+ serviceContext ) ;
4048
4149 _responseHeaders = new HttpResponseHeaders ( ) ;
4250 _responseHeaders . HeaderContentType = "application/json" ;
0 commit comments