From 9fde35c64ca0e62b292afc05415c7eecb8345142 Mon Sep 17 00:00:00 2001 From: Stephen Lautier Date: Tue, 23 Jul 2024 18:48:07 +0200 Subject: [PATCH] chore(benchmark): updateproj --- benchmark/Benchmarking.cs | 7 ++++--- .../FluentlyHttpClient.Benchmarks.csproj | 5 +++-- benchmark/Program.cs | 19 +++---------------- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/benchmark/Benchmarking.cs b/benchmark/Benchmarking.cs index 953eb99..e38ba77 100644 --- a/benchmark/Benchmarking.cs +++ b/benchmark/Benchmarking.cs @@ -1,7 +1,8 @@ -using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Jobs; using FluentlyHttpClient.Middleware; using FluentlyHttpClient.Test; +using MessagePack.Resolvers; using Microsoft.Extensions.DependencyInjection; using RichardSzalay.MockHttp; using Serilog; @@ -9,7 +10,7 @@ namespace FluentlyHttpClient.Benchmarks; -[SimpleJob(RuntimeMoniker.NetCoreApp30)] +[SimpleJob(RuntimeMoniker.Net80)] [RPlotExporter, RankColumn] [MemoryDiagnoser] public class Benchmarking @@ -65,7 +66,7 @@ public void Setup() }) .UseTimer() .WithMessageHandler(mockHttp) - .ConfigureFormatters(x => x.Default = new MessagePackMediaTypeFormatter()) + .ConfigureFormatters(x => x.Default = new MessagePackMediaTypeFormatter(ContractlessStandardResolver.Options)) ; _messagePackHttpClient = fluentHttpClientFactory.Add(clientBuilder); } diff --git a/benchmark/FluentlyHttpClient.Benchmarks.csproj b/benchmark/FluentlyHttpClient.Benchmarks.csproj index 0e537fc..44beddd 100644 --- a/benchmark/FluentlyHttpClient.Benchmarks.csproj +++ b/benchmark/FluentlyHttpClient.Benchmarks.csproj @@ -1,8 +1,9 @@ - + Exe - net8.0 + enable + enable false diff --git a/benchmark/Program.cs b/benchmark/Program.cs index e88e780..995e3fc 100644 --- a/benchmark/Program.cs +++ b/benchmark/Program.cs @@ -1,17 +1,4 @@ -using BenchmarkDotNet.Running; +using BenchmarkDotNet.Running; +using FluentlyHttpClient.Benchmarks; -namespace FluentlyHttpClient.Benchmarks; - -static class Program -{ - static void Main(string[] args) - { - //var benchmarking = new Benchmarking(); - //benchmarking.Setup(); - - //benchmarking.PostAsMessagePack().Wait(); - //benchmarking.PostAsJson().Wait(); - var summary = BenchmarkRunner.Run(); - - } -} \ No newline at end of file +var summary = BenchmarkRunner.Run(); \ No newline at end of file