mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 03:24:33 +08:00
fixed sln change and moved options to seperate file
This commit is contained in:
@@ -41,9 +41,6 @@ EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MQTTnet.Benchmarks", "Tests\MQTTnet.Benchmarks\MQTTnet.Benchmarks.csproj", "{998D04DD-7CB0-45F5-A393-E2495C16399E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(Performance) = preSolution
|
||||
HasPerformanceSessions = true
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System.Linq;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Validators;
|
||||
|
||||
namespace MQTTnet.Benchmarks
|
||||
{
|
||||
/// <summary>
|
||||
/// this options may be used to run benchmarks in debugmode and attach a performance profiler
|
||||
/// https://benchmarkdotnet.org/Configs/Configs.htm
|
||||
/// </summary>
|
||||
public class AllowNonOptimized : ManualConfig
|
||||
{
|
||||
public AllowNonOptimized()
|
||||
{
|
||||
Add(JitOptimizationsValidator.DontFailOnError); // ALLOW NON-OPTIMIZED DLLS
|
||||
Add(DefaultConfig.Instance.GetLoggers().ToArray()); // manual config has no loggers by default
|
||||
Add(DefaultConfig.Instance.GetExporters().ToArray()); // manual config has no exporters by default
|
||||
Add(DefaultConfig.Instance.GetColumnProviders().ToArray()); // manual config has no columns by default
|
||||
Add(Job.InProcess);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,4 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Attributes.Exporters;
|
||||
using BenchmarkDotNet.Attributes.Jobs;
|
||||
using BenchmarkDotNet.Configs;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Validators;
|
||||
using MQTTnet.Adapter;
|
||||
using MQTTnet.Core.Internal;
|
||||
using MQTTnet.Diagnostics;
|
||||
@@ -11,27 +6,11 @@ using MQTTnet.Internal;
|
||||
using MQTTnet.Packets;
|
||||
using MQTTnet.Serializer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MQTTnet.Benchmarks
|
||||
{
|
||||
public class AllowNonOptimized : ManualConfig
|
||||
{
|
||||
public AllowNonOptimized()
|
||||
{
|
||||
Add(JitOptimizationsValidator.DontFailOnError); // ALLOW NON-OPTIMIZED DLLS
|
||||
Add(DefaultConfig.Instance.GetLoggers().ToArray()); // manual config has no loggers by default
|
||||
Add(DefaultConfig.Instance.GetExporters().ToArray()); // manual config has no exporters by default
|
||||
Add(DefaultConfig.Instance.GetColumnProviders().ToArray()); // manual config has no columns by default
|
||||
Add(Job.InProcess);
|
||||
}
|
||||
}
|
||||
|
||||
[MemoryDiagnoser]
|
||||
public class ChannelAdapterBenchmark
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user