Skip to content

Commit 39b2fe8

Browse files
committed
Update
1 parent 91b36c3 commit 39b2fe8

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/Servers/Kestrel/perf/Kestrel.Performance/Http2ConnectionHeadersBenchmark.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,23 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
99
{
1010
public class Http2ConnectionHeadersBenchmark : Http2ConnectionBenchmarkBase
1111
{
12-
[Params(0, 1, 4, 32)]
12+
[Params(1, 4, 32)]
1313
public int CustomHeaders { get; set; }
1414

15+
[Params(true, false)]
16+
public bool HeadersChange { get; set; }
17+
1518
private int _headerIndex;
1619

1720
protected override Task ProcessRequest(HttpContext httpContext)
1821
{
1922
for (var i = 0; i < CustomHeaders; i++)
2023
{
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+
}
2229
}
2330

2431
return Task.CompletedTask;

0 commit comments

Comments
 (0)