File tree 3 files changed +10
-21
lines changed
3 files changed +10
-21
lines changed Original file line number Diff line number Diff line change 1
- using BenchmarkDotNet . Attributes ;
1
+ using BenchmarkDotNet . Attributes ;
2
2
using BenchmarkDotNet . Jobs ;
3
3
using FluentlyHttpClient . Middleware ;
4
4
using FluentlyHttpClient . Test ;
5
+ using MessagePack . Resolvers ;
5
6
using Microsoft . Extensions . DependencyInjection ;
6
7
using RichardSzalay . MockHttp ;
7
8
using Serilog ;
8
9
using Sketch7 . MessagePack . MediaTypeFormatter ;
9
10
10
11
namespace FluentlyHttpClient . Benchmarks ;
11
12
12
- [ SimpleJob ( RuntimeMoniker . NetCoreApp30 ) ]
13
+ [ SimpleJob ( RuntimeMoniker . Net80 ) ]
13
14
[ RPlotExporter , RankColumn ]
14
15
[ MemoryDiagnoser ]
15
16
public class Benchmarking
@@ -65,7 +66,7 @@ public void Setup()
65
66
} )
66
67
. UseTimer ( )
67
68
. WithMessageHandler ( mockHttp )
68
- . ConfigureFormatters ( x => x . Default = new MessagePackMediaTypeFormatter ( ) )
69
+ . ConfigureFormatters ( x => x . Default = new MessagePackMediaTypeFormatter ( ContractlessStandardResolver . Options ) )
69
70
;
70
71
_messagePackHttpClient = fluentHttpClientFactory . Add ( clientBuilder ) ;
71
72
}
Original file line number Diff line number Diff line change 1
- <Project Sdk =" Microsoft.NET.Sdk" >
1
+ <Project Sdk =" Microsoft.NET.Sdk" >
2
2
3
3
<PropertyGroup >
4
4
<OutputType >Exe</OutputType >
5
- <TargetFramework >net8.0</TargetFramework >
5
+ <ImplicitUsings >enable</ImplicitUsings >
6
+ <Nullable >enable</Nullable >
6
7
<IsPackable >false</IsPackable >
7
8
</PropertyGroup >
8
9
Original file line number Diff line number Diff line change 1
- using BenchmarkDotNet . Running ;
1
+ using BenchmarkDotNet . Running ;
2
+ using FluentlyHttpClient . Benchmarks ;
2
3
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 > ( ) ;
You can’t perform that action at this time.
0 commit comments