Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Add benchmarks for ResponseHeaders sets #1256

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

         Method |                 Type |          Mean |     StdDev |           RPS | Allocated |
--------------- |--------------------- |-------------- |----------- |-------------- |---------- |
 BenchmarkAsync |               Common | 1,629.2051 ns | 27.7161 ns |    613,796.25 |       0 B |
 BenchmarkAsync | ContentLengthNumeric |   112.6076 ns |  3.0445 ns |  8,880,393.09 |      32 B |
 BenchmarkAsync |  ContentLengthString |    81.6983 ns |  1.9815 ns | 12,240,157.06 |       0 B |
 BenchmarkAsync |            Plaintext |   192.4687 ns |  2.2937 ns |  5,195,649.48 |       0 B |
 BenchmarkAsync |              Primary |   328.8702 ns |  4.7975 ns |  3,040,713.69 |       0 B |
 BenchmarkAsync |              Unknown |   694.0381 ns |  9.6555 ns |  1,440,843.10 |       0 B |

private static FrameResponseHeaders HeadersDirect;
private static DateHeaderValueManager DateHeaderValueManager = new DateHeaderValueManager();

private MemoryPool MemoryPool;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: _memoryPool, same for other fields. Or make them properties.

MemoryPool.Dispose();
}

private class NullScopeLogger : ILogger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
for (int i = 0; i < InnerLoopCount; i++)
{
await Application.ProcessRequestAsync(Context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why benchmark via app instead of just instantiating FrameResponseHeaders and setting directly?

@benaadams
Copy link
Contributor Author

Superseded by benchmarks in #1308

@benaadams benaadams closed this Jan 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants