File tree Expand file tree Collapse file tree 4 files changed +52
-9
lines changed
Expand file tree Collapse file tree 4 files changed +52
-9
lines changed Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
55 <TargetFramework >net10.0</TargetFramework >
6- <CopyLocalLockFileAssemblies Condition = " '$(Configuration)'=='Debug' " >true</CopyLocalLockFileAssemblies >
6+ <CopyLocalLockFileAssemblies >true</CopyLocalLockFileAssemblies >
77 <ImplicitUsings >enable</ImplicitUsings >
88 <Nullable >enable</Nullable >
99 <SignAssembly >True</SignAssembly >
2020
2121 <ItemGroup >
2222 <PackageReference Include =" BenchmarkDotNet" Version =" 0.15.8" />
23- <PackageReference Include =" Mapster" Version =" $(SciVersion)" />
2423 </ItemGroup >
25-
24+ <ItemGroup Condition =" '$(Configuration)'=='Debug'" >
25+ <PackageReference Include =" Mapster" Version =" $(SciVersion)" />
26+ </ItemGroup >
27+ <ItemGroup Condition =" '$(Configuration)'=='Release'" >
28+ <PackageReference Include =" Mapster" Version =" $(SciVersion)" />
29+ </ItemGroup >
30+ <ItemGroup Condition =" '$(Configuration)'=='nuget-bench'" >
31+ <PackageReference Include =" Mapster" Version =" $(SciVersion)" />
32+ </ItemGroup >
33+ <ItemGroup Condition =" '$(Configuration)'=='developer-bench'" >
34+ <ProjectReference Include =" ..\Mapster\Mapster.csproj" />
35+ </ItemGroup >
36+
2637</Project >
Original file line number Diff line number Diff line change 1- using BenchmarkDotNet . Columns ;
1+ using Benchmark . Development ;
2+ using BenchmarkDotNet . Columns ;
23using BenchmarkDotNet . Configs ;
34using BenchmarkDotNet . Diagnosers ;
45using BenchmarkDotNet . Exporters ;
@@ -31,23 +32,28 @@ public Config()
3132
3233 AddColumn ( BaselineRatioColumn . RatioMean ) ;
3334 AddColumnProvider ( DefaultColumnProviders . Metrics ) ;
35+
3436
35- string [ ] targetVersions = [
36- "7.4.0" ,
37- "9.0.0-pre01" ,
38- ] ;
3937
40- foreach ( var version in targetVersions )
38+ foreach ( var version in MapsterVersion . Get ( ) )
4139 {
4240 AddJob ( Job . ShortRun
4341 . WithLaunchCount ( 1 )
4442 . WithWarmupCount ( 2 )
4543 . WithIterationCount ( 10 )
44+ . WithCustomBuildConfiguration ( "nuget-bench" )
4645 . WithMsBuildArguments ( $ "/p:SciVersion={ version } ")
4746 . WithId ( $ "v{ version } ")
4847 ) ;
4948 }
5049
50+ AddJob ( Job . ShortRun
51+ . WithLaunchCount ( 1 )
52+ . WithWarmupCount ( 2 )
53+ . WithIterationCount ( 10 )
54+ . WithCustomBuildConfiguration ( "developer-bench" )
55+ . WithId ( "developer" ) ) ;
56+
5157 Options |= ConfigOptions . JoinSummary ;
5258 }
5359 }
Original file line number Diff line number Diff line change 1+ namespace Benchmark . Development
2+ {
3+ internal static class MapsterVersion
4+ {
5+
6+ internal static string [ ] Get ( ) =>
7+ [
8+ "7.4.0" ,
9+ "9.0.0-pre01"
10+ ] ;
11+ }
12+ }
Original file line number Diff line number Diff line change 1+ <Project >
2+ <PropertyGroup >
3+ <!-- Properties related to benchmark builds -->
4+ <IsPackable >false</IsPackable >
5+ </PropertyGroup >
6+ <PropertyGroup Condition =" '$(Configuration)'=='nuget-bench'" >
7+ <Optimize >true</Optimize >
8+ <SignAssembly >false</SignAssembly >
9+ </PropertyGroup >
10+ <PropertyGroup Condition =" '$(Configuration)'=='developer-bench'" >
11+ <Optimize >true</Optimize >
12+ <SignAssembly >false</SignAssembly >
13+ </PropertyGroup >
14+ </Project >
You can’t perform that action at this time.
0 commit comments