Feedback + Cleanup
This commit is contained in:
parent
4cdcca212e
commit
7ab4442392
|
|
@ -43,6 +43,4 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
|||
|
||||
All = uint.MaxValue
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Engines;
|
||||
using BenchmarkDotNet.Environments;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Validators;
|
||||
|
||||
|
|
@ -17,10 +16,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
|||
Add(new RpsColumn());
|
||||
|
||||
Add(Job.Default.
|
||||
With(Platform.X64).
|
||||
With(Jit.RyuJit).
|
||||
With(BenchmarkDotNet.Environments.Runtime.Core).
|
||||
WithRemoveOutliers(true).
|
||||
With(new GcMode() { Server = true }).
|
||||
With(RunStrategy.Throughput).
|
||||
WithLaunchCount(3).
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
|||
With(Platform.X64).
|
||||
With(Jit.RyuJit).
|
||||
With(BenchmarkDotNet.Environments.Runtime.Clr).
|
||||
WithRemoveOutliers(true).
|
||||
With(new GcMode() { Server = true }).
|
||||
With(RunStrategy.Throughput).
|
||||
WithLaunchCount(3).
|
||||
|
|
@ -28,10 +27,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
|||
WithTargetCount(10));
|
||||
|
||||
Add(Job.Default.
|
||||
With(Platform.X64).
|
||||
With(Jit.RyuJit).
|
||||
With(BenchmarkDotNet.Environments.Runtime.Core).
|
||||
WithRemoveOutliers(true).
|
||||
With(new GcMode() { Server = true }).
|
||||
With(RunStrategy.Throughput).
|
||||
WithLaunchCount(3).
|
||||
|
|
|
|||
|
|
@ -20,17 +20,14 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
|
|||
|
||||
public override void ConnectionRead(string connectionId, int count)
|
||||
{
|
||||
//_logger.LogDebug(1, @"Connection id ""{ConnectionId}"" recv {count} bytes.", connectionId, count);
|
||||
}
|
||||
|
||||
public override void ConnectionWrite(string connectionId, int count)
|
||||
{
|
||||
//_logger.LogDebug(1, @"Connection id ""{ConnectionId}"" send {count} bytes.", connectionId, count);
|
||||
}
|
||||
|
||||
public override void ConnectionWriteCallback(string connectionId, int status)
|
||||
{
|
||||
//_logger.LogDebug(1, @"Connection id ""{ConnectionId}"" send finished with status {status}.", connectionId, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
||||
{
|
||||
|
|
@ -13,6 +14,8 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
public static readonly int? ECONNRESET = GetECONNRESET();
|
||||
public static readonly int? EADDRINUSE = GetEADDRINUSE();
|
||||
|
||||
public static readonly Encoding UTF8 = Encoding.UTF8;
|
||||
|
||||
/// <summary>
|
||||
/// Prefix of host name used to specify Unix sockets in the configuration.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
0x02ul << 40 |
|
||||
0x01ul << 48 ) + 1;
|
||||
|
||||
private static readonly Encoding _utf8 = Encoding.UTF8;
|
||||
private static readonly int _vectorSpan = Vector<byte>.Count;
|
||||
|
||||
private MemoryPoolBlock _block;
|
||||
|
|
@ -1124,10 +1123,10 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
}
|
||||
if (end.Block == Block)
|
||||
{
|
||||
return _utf8.GetString(Block.Array, Index, end.Index - Index);
|
||||
return Constants.UTF8.GetString(Block.Array, Index, end.Index - Index);
|
||||
}
|
||||
|
||||
var decoder = _utf8.GetDecoder();
|
||||
var decoder = Constants.UTF8.GetDecoder();
|
||||
|
||||
var length = GetLength(end);
|
||||
var charLength = length;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,11 @@ using System.Diagnostics;
|
|||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Internal.Http;
|
||||
|
||||
namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
||||
{
|
||||
public static class MemoryPoolIteratorExtensions
|
||||
{
|
||||
private static readonly Encoding _utf8 = Encoding.UTF8;
|
||||
|
||||
public const string Http10Version = "HTTP/1.0";
|
||||
public const string Http11Version = "HTTP/1.1";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue