Skip to content

Commit 9fde35c

Browse files
chore(benchmark): updateproj
1 parent 7cc90ab commit 9fde35c

File tree

3 files changed

+10
-21
lines changed

3 files changed

+10
-21
lines changed

benchmark/Benchmarking.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
using BenchmarkDotNet.Attributes;
1+
using BenchmarkDotNet.Attributes;
22
using BenchmarkDotNet.Jobs;
33
using FluentlyHttpClient.Middleware;
44
using FluentlyHttpClient.Test;
5+
using MessagePack.Resolvers;
56
using Microsoft.Extensions.DependencyInjection;
67
using RichardSzalay.MockHttp;
78
using Serilog;
89
using Sketch7.MessagePack.MediaTypeFormatter;
910

1011
namespace FluentlyHttpClient.Benchmarks;
1112

12-
[SimpleJob(RuntimeMoniker.NetCoreApp30)]
13+
[SimpleJob(RuntimeMoniker.Net80)]
1314
[RPlotExporter, RankColumn]
1415
[MemoryDiagnoser]
1516
public class Benchmarking
@@ -65,7 +66,7 @@ public void Setup()
6566
})
6667
.UseTimer()
6768
.WithMessageHandler(mockHttp)
68-
.ConfigureFormatters(x => x.Default = new MessagePackMediaTypeFormatter())
69+
.ConfigureFormatters(x => x.Default = new MessagePackMediaTypeFormatter(ContractlessStandardResolver.Options))
6970
;
7071
_messagePackHttpClient = fluentHttpClientFactory.Add(clientBuilder);
7172
}

benchmark/FluentlyHttpClient.Benchmarks.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
67
<IsPackable>false</IsPackable>
78
</PropertyGroup>
89

benchmark/Program.cs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
using BenchmarkDotNet.Running;
1+
using BenchmarkDotNet.Running;
2+
using FluentlyHttpClient.Benchmarks;
23

3-
namespace FluentlyHttpClient.Benchmarks;
4-
5-
static class Program
6-
{
7-
static void Main(string[] args)
8-
{
9-
//var benchmarking = new Benchmarking();
10-
//benchmarking.Setup();
11-
12-
//benchmarking.PostAsMessagePack().Wait();
13-
//benchmarking.PostAsJson().Wait();
14-
var summary = BenchmarkRunner.Run<Benchmarking>();
15-
16-
}
17-
}
4+
var summary = BenchmarkRunner.Run<Benchmarking>();

0 commit comments

Comments
 (0)