@@ -1,9 +1,10 @@ | |||||
using BenchmarkDotNet.Attributes; | using BenchmarkDotNet.Attributes; | ||||
using BenchmarkDotNet.Jobs; | |||||
using MQTTnet.Diagnostics; | using MQTTnet.Diagnostics; | ||||
namespace MQTTnet.Benchmarks | namespace MQTTnet.Benchmarks | ||||
{ | { | ||||
[ClrJob] | |||||
[SimpleJob(RuntimeMoniker.Net461)] | |||||
[RPlotExporter] | [RPlotExporter] | ||||
[MemoryDiagnoser] | [MemoryDiagnoser] | ||||
public class LoggerBenchmark | public class LoggerBenchmark | ||||
@@ -1,11 +1,12 @@ | |||||
using BenchmarkDotNet.Attributes; | using BenchmarkDotNet.Attributes; | ||||
using BenchmarkDotNet.Jobs; | |||||
using MQTTnet.Client; | using MQTTnet.Client; | ||||
using MQTTnet.Client.Options; | using MQTTnet.Client.Options; | ||||
using MQTTnet.Server; | using MQTTnet.Server; | ||||
namespace MQTTnet.Benchmarks | namespace MQTTnet.Benchmarks | ||||
{ | { | ||||
[ClrJob] | |||||
[SimpleJob(RuntimeMoniker.Net461)] | |||||
[RPlotExporter, RankColumn] | [RPlotExporter, RankColumn] | ||||
[MemoryDiagnoser] | [MemoryDiagnoser] | ||||
public class MessageProcessingBenchmark | public class MessageProcessingBenchmark | ||||
@@ -8,10 +8,11 @@ using MQTTnet.Adapter; | |||||
using MQTTnet.Channel; | using MQTTnet.Channel; | ||||
using MQTTnet.Formatter; | using MQTTnet.Formatter; | ||||
using MQTTnet.Formatter.V3; | using MQTTnet.Formatter.V3; | ||||
using BenchmarkDotNet.Jobs; | |||||
namespace MQTTnet.Benchmarks | namespace MQTTnet.Benchmarks | ||||
{ | { | ||||
[ClrJob] | |||||
[SimpleJob(RuntimeMoniker.Net461)] | |||||
[RPlotExporter] | [RPlotExporter] | ||||
[MemoryDiagnoser] | [MemoryDiagnoser] | ||||
public class SerializerBenchmark | public class SerializerBenchmark | ||||
@@ -1,10 +1,11 @@ | |||||
using BenchmarkDotNet.Attributes; | using BenchmarkDotNet.Attributes; | ||||
using BenchmarkDotNet.Jobs; | |||||
using MQTTnet.Server; | using MQTTnet.Server; | ||||
using System; | using System; | ||||
namespace MQTTnet.Benchmarks | namespace MQTTnet.Benchmarks | ||||
{ | { | ||||
[ClrJob] | |||||
[SimpleJob(RuntimeMoniker.Net461)] | |||||
[RPlotExporter] | [RPlotExporter] | ||||
[MemoryDiagnoser] | [MemoryDiagnoser] | ||||
public class TopicFilterComparerBenchmark | public class TopicFilterComparerBenchmark | ||||
@@ -895,7 +895,7 @@ namespace MQTTnet.Tests | |||||
{ | { | ||||
var serverOptions = new MqttServerOptionsBuilder().WithConnectionValidator(context => | var serverOptions = new MqttServerOptionsBuilder().WithConnectionValidator(context => | ||||
{ | { | ||||
context.ReturnCode = MqttConnectReturnCode.ConnectionRefusedNotAuthorized; | |||||
context.ReasonCode = MqttConnectReasonCode.NotAuthorized; | |||||
}); | }); | ||||
using (var testEnvironment = new TestEnvironment(TestContext)) | using (var testEnvironment = new TestEnvironment(TestContext)) | ||||
@@ -11,14 +11,11 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" /> | <PackageReference Include="Microsoft.AspNetCore" Version="2.1.6" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.6" /> | |||||
<PackageReference Include="Microsoft.AspNetCore.Connections.Abstractions" Version="2.1.3" /> | |||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\Source\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | <ProjectReference Include="..\..\Source\MQTTnet.AspnetCore\MQTTnet.AspNetCore.csproj" /> | ||||
<ProjectReference Include="..\..\Source\MQTTnet\MQTTnet.csproj" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -30,7 +30,7 @@ namespace MQTTnet.TestApp.NetCore | |||||
{ | { | ||||
if (p.Username != "USER" || p.Password != "PASS") | if (p.Username != "USER" || p.Password != "PASS") | ||||
{ | { | ||||
p.ReturnCode = MqttConnectReturnCode.ConnectionRefusedBadUsernameOrPassword; | |||||
p.ReasonCode = MqttConnectReasonCode.BadUserNameOrPassword; | |||||
} | } | ||||
} | } | ||||
}), | }), | ||||