File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/Servers/Kestrel/perf/Kestrel.Performance Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -9,16 +9,23 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
9
9
{
10
10
public class Http2ConnectionHeadersBenchmark : Http2ConnectionBenchmarkBase
11
11
{
12
- [ Params ( 0 , 1 , 4 , 32 ) ]
12
+ [ Params ( 1 , 4 , 32 ) ]
13
13
public int CustomHeaders { get ; set ; }
14
14
15
+ [ Params ( true , false ) ]
16
+ public bool HeadersChange { get ; set ; }
17
+
15
18
private int _headerIndex ;
16
19
17
20
protected override Task ProcessRequest ( HttpContext httpContext )
18
21
{
19
22
for ( var i = 0 ; i < CustomHeaders ; i ++ )
20
23
{
21
- httpContext . Response . Headers [ "CustomHeader" + _headerIndex ++ ] = "The quick brown fox jumps over the lazy dog." ;
24
+ httpContext . Response . Headers [ "CustomHeader" + _headerIndex ] = "The quick brown fox jumps over the lazy dog." ;
25
+ if ( HeadersChange )
26
+ {
27
+ _headerIndex ++ ;
28
+ }
22
29
}
23
30
24
31
return Task . CompletedTask ;
You can’t perform that action at this time.
0 commit comments