Fixed benchmarks after refactoring

- Added MockTimeoutControl
This commit is contained in:
David Fowler 2017-04-14 20:15:16 -07:00
parent 051c251e53
commit 0ac478858d
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks
{
public class MockTimeoutControl : ITimeoutControl
{
public void CancelTimeout()
{
}
public void ResetTimeout(long ticks, TimeoutAction timeoutAction)
{
}
public void SetTimeout(long ticks, TimeoutAction timeoutAction)
{
}
}
}

View File

@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
@ -33,6 +34,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Performance
};
Frame = new Frame<object>(application: null, frameContext: frameContext);
Frame.TimeoutControl = new MockTimeoutControl();
PipelineFactory = new PipeFactory();
Pipe = PipelineFactory.Create();
}