Selaa lähdekoodia

fixed sln change and moved options to seperate file

release/3.x.x
Jan Eggers 6 vuotta sitten
vanhempi
commit
2578b380f9
3 muutettua tiedostoa jossa 23 lisäystä ja 24 poistoa
  1. +0
    -3
      MQTTnet.sln
  2. +23
    -0
      Tests/MQTTnet.Benchmarks/AllowNonOptimized.cs
  3. +0
    -21
      Tests/MQTTnet.Benchmarks/ChannelAdapterBenchmark.cs

+ 0
- 3
MQTTnet.sln Näytä tiedosto

@@ -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


+ 23
- 0
Tests/MQTTnet.Benchmarks/AllowNonOptimized.cs Näytä tiedosto

@@ -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);
}
}
}

+ 0
- 21
Tests/MQTTnet.Benchmarks/ChannelAdapterBenchmark.cs Näytä tiedosto

@@ -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
{


Ladataan…
Peruuta
Tallenna