diff --git a/src/Benchmark.Development/Benchmark.Development.csproj b/src/Benchmark.Development/Benchmark.Development.csproj index 572bdf29..2213d7a4 100644 --- a/src/Benchmark.Development/Benchmark.Development.csproj +++ b/src/Benchmark.Development/Benchmark.Development.csproj @@ -3,7 +3,7 @@ Exe net10.0 - true + true enable enable True @@ -20,7 +20,18 @@ - - + + + + + + + + + + + + + diff --git a/src/Benchmark.Development/Benchmarks/Config.cs b/src/Benchmark.Development/Benchmarks/Config.cs index 554581ab..87dad0fe 100644 --- a/src/Benchmark.Development/Benchmarks/Config.cs +++ b/src/Benchmark.Development/Benchmarks/Config.cs @@ -1,4 +1,5 @@ -using BenchmarkDotNet.Columns; +using Benchmark.Development; +using BenchmarkDotNet.Columns; using BenchmarkDotNet.Configs; using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Exporters; @@ -31,23 +32,28 @@ public Config() AddColumn(BaselineRatioColumn.RatioMean); AddColumnProvider(DefaultColumnProviders.Metrics); + - string[] targetVersions = [ - "7.4.0", - "9.0.0-pre01", - ]; - foreach (var version in targetVersions) + foreach (var version in MapsterVersion.Get()) { AddJob(Job.ShortRun .WithLaunchCount(1) .WithWarmupCount(2) .WithIterationCount(10) + .WithCustomBuildConfiguration("nuget-bench") .WithMsBuildArguments($"/p:SciVersion={version}") .WithId($"v{version}") ); } + AddJob(Job.ShortRun + .WithLaunchCount(1) + .WithWarmupCount(2) + .WithIterationCount(10) + .WithCustomBuildConfiguration("developer-bench") + .WithId("developer")); + Options |= ConfigOptions.JoinSummary; } } diff --git a/src/Benchmark.Development/MapsterVersion.cs b/src/Benchmark.Development/MapsterVersion.cs new file mode 100644 index 00000000..bfca6a69 --- /dev/null +++ b/src/Benchmark.Development/MapsterVersion.cs @@ -0,0 +1,12 @@ +namespace Benchmark.Development +{ + internal static class MapsterVersion + { + + internal static string[] Get() => + [ + "7.4.0", + "9.0.0-pre01" + ]; + } +} diff --git a/src/Mapster/Directory.Build.props b/src/Mapster/Directory.Build.props new file mode 100644 index 00000000..50586750 --- /dev/null +++ b/src/Mapster/Directory.Build.props @@ -0,0 +1,14 @@ + + + + false + + + true + false + + + true + false + + \ No newline at end of file