Skip to content

Commit

Permalink
chore(benchmark): updateproj
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlautier committed Jul 23, 2024
1 parent 7cc90ab commit 9fde35c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
7 changes: 4 additions & 3 deletions benchmark/Benchmarking.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
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;
using Sketch7.MessagePack.MediaTypeFormatter;

namespace FluentlyHttpClient.Benchmarks;

[SimpleJob(RuntimeMoniker.NetCoreApp30)]
[SimpleJob(RuntimeMoniker.Net80)]
[RPlotExporter, RankColumn]
[MemoryDiagnoser]
public class Benchmarking
Expand Down Expand Up @@ -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);
}
Expand Down
5 changes: 3 additions & 2 deletions benchmark/FluentlyHttpClient.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
19 changes: 3 additions & 16 deletions benchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -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<Benchmarking>();

}
}
var summary = BenchmarkRunner.Run<Benchmarking>();

0 comments on commit 9fde35c

Please sign in to comment.