Skip to content

Commit 75274f9

Browse files
committed
Some more reverts.
1 parent 438e0fa commit 75274f9

File tree

11 files changed

+27
-27
lines changed

11 files changed

+27
-27
lines changed

samples/BenchmarkDotNet.Samples/IntroFluentConfigBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void Run()
3838
.Run<Algo_Md5VsSha256>(
3939
DefaultConfig.Instance
4040
.AddJob(Job.Default.WithRuntime(ClrRuntime.Net462))
41-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core21))
41+
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core80))
4242
.AddValidator(ExecutionValidator.FailOnError));
4343
}
4444
}

src/BenchmarkDotNet/Environments/Runtimes/Runtime.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public abstract class Runtime : IEquatable<Runtime>
1818
public RuntimeMoniker RuntimeMoniker { get; }
1919

2020
/// <summary>
21-
/// MsBuild Target Framework Moniker, example: net462, netcoreapp2.1
21+
/// MsBuild Target Framework Moniker, example: net462, net8.0
2222
/// </summary>
2323
public string MsBuildMoniker { get; }
2424

src/BenchmarkDotNet/Helpers/ArtifactFileNameHelper.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static string GetLimitedFilePath(DiagnoserActionParameters details, stri
6969

7070
private static string GetFilePath(string fileName, DiagnoserActionParameters details, string? subfolder, DateTime? creationTime, string fileExtension)
7171
{
72-
// if we run for more than one toolchain, the output file name should contain the name too so we can differ net462 vs netcoreapp2.1 etc
72+
// if we run for more than one toolchain, the output file name should contain the name too so we can differ net462 vs net8.0 etc
7373
if (details.Config.GetJobs().Select(job => ToolchainExtensions.GetToolchain(job)).Distinct().Count() > 1)
7474
fileName += $"-{details.BenchmarkCase.Job.Environment.Runtime?.Name ?? details.BenchmarkCase.GetToolchain()?.Name ?? details.BenchmarkCase.Job.Id}";
7575

src/BenchmarkDotNet/Toolchains/DotNetCli/CustomDotNetCliToolchainBuilder.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public CustomDotNetCliToolchainBuilder UseNuGetClearTag(bool value)
5050
return this;
5151
}
5252

53-
/// <param name="targetFrameworkMoniker">TFM, example: netcoreapp2.1</param>
53+
/// <param name="targetFrameworkMoniker">TFM, example: net8.0</param>
5454
[PublicAPI]
5555
[SuppressMessage("ReSharper", "ParameterHidesMember")]
5656
public CustomDotNetCliToolchainBuilder TargetFrameworkMoniker(string targetFrameworkMoniker)

src/BenchmarkDotNet/Toolchains/DotNetCli/NetCoreAppSettings.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class NetCoreAppSettings
2323

2424
/// <summary>
2525
/// <param name="targetFrameworkMoniker">
26-
/// sample values: netcoreapp2.0, netcoreapp2.1
26+
/// sample values: net6.0, net8.0
2727
/// </param>
2828
/// <param name="runtimeFrameworkVersion">
2929
/// used in the auto-generated .csproj file
@@ -65,7 +65,7 @@ public NetCoreAppSettings(
6565
}
6666

6767
/// <summary>
68-
/// sample values: netcoreapp2.0, netcoreapp2.1
68+
/// sample values: net6.0, net8.0
6969
/// </summary>
7070
public string TargetFrameworkMoniker { get; }
7171

tests/BenchmarkDotNet.Tests/ConfigParserTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public void WhenConfigOptionsFlagsAreNotSpecifiedTheyAreNotSet()
339339
public void PackagesPathParsedCorrectly()
340340
{
341341
var fakeRestoreDirectory = new FileInfo(typeof(object).Assembly.Location).Directory.FullName;
342-
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.0", "--packages", fakeRestoreDirectory }, new OutputLogger(Output)).config;
342+
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.1", "--packages", fakeRestoreDirectory }, new OutputLogger(Output)).config;
343343

344344
Assert.Single(config.GetJobs());
345345
CsProjCoreToolchain toolchain = config.GetJobs().Single().GetToolchain() as CsProjCoreToolchain;
@@ -351,7 +351,7 @@ public void PackagesPathParsedCorrectly()
351351
public void UserCanSpecifyBuildTimeout()
352352
{
353353
const int timeoutInSeconds = 10;
354-
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.0", "--buildTimeout", timeoutInSeconds.ToString() }, new OutputLogger(Output)).config;
354+
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.1", "--buildTimeout", timeoutInSeconds.ToString() }, new OutputLogger(Output)).config;
355355

356356
Assert.Single(config.GetJobs());
357357
CsProjCoreToolchain toolchain = config.GetJobs().Single().GetToolchain() as CsProjCoreToolchain;
@@ -362,7 +362,7 @@ public void UserCanSpecifyBuildTimeout()
362362
[Fact]
363363
public void WhenUserDoesNotSpecifyTimeoutTheDefaultValueIsUsed()
364364
{
365-
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.0" }, new OutputLogger(Output)).config;
365+
var config = ConfigParser.Parse(new[] { "-r", "netcoreapp3.1" }, new OutputLogger(Output)).config;
366366

367367
Assert.Single(config.GetJobs());
368368
CsProjCoreToolchain toolchain = config.GetJobs().Single().GetToolchain() as CsProjCoreToolchain;
@@ -452,7 +452,7 @@ public void CanCompareFewDifferentRuntimes()
452452
[InlineData("10ms")]
453453
public void CanUseStatisticalTestsToCompareFewDifferentRuntimes(string threshold)
454454
{
455-
string[] arguments = ["--runtimes", "netcoreapp2.1", "netcoreapp2.2", "--statisticalTest", threshold];
455+
string[] arguments = ["--runtimes", "net6.0", "net8.0", "--statisticalTest", threshold];
456456
var config = ConfigParser.Parse(arguments, new OutputLogger(Output)).config;
457457

458458
var mockSummary = MockFactory.CreateSummary(config);

tests/BenchmarkDotNet.Tests/Configs/ImmutableConfigTests.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,10 @@ public void MissingDependencyIsNotAddedWhenItIsAlreadyPresent()
249249
[Fact]
250250
public void WhenTwoConfigsAreAddedTheRegularJobsAreJustAdded()
251251
{
252-
var configWithClrJob = CreateConfigFromJobs(Job.Default.WithRuntime(CoreRuntime.Core21));
253-
var configWithCoreJob = CreateConfigFromJobs(Job.Default.WithRuntime(ClrRuntime.Net462));
252+
var configWithClrJob = CreateConfigFromJobs(Job.Default.WithRuntime(ClrRuntime.Net462));
253+
var configWithCoreJob = CreateConfigFromJobs(Job.Default.WithRuntime(CoreRuntime.Core80));
254254

255-
foreach (var added in AddLeftToTheRightAndRightToTheLef(configWithClrJob, configWithCoreJob))
255+
foreach (var added in AddLeftToTheRightAndRightToTheLef(configWithCoreJob, configWithClrJob))
256256
{
257257
var runnableJobs = added.GetJobs();
258258

@@ -269,7 +269,7 @@ public void WhenTwoConfigsAreAddedTheMutatorJobsAreAppliedToAllOtherJobs()
269269
var configWithMutatorJob = CreateConfigFromJobs(Job.Default.WithWarmupCount(warmupCount).AsMutator());
270270
var configWithTwoStandardJobs = CreateConfigFromJobs(
271271
Job.Default.WithRuntime(ClrRuntime.Net462),
272-
Job.Default.WithRuntime(CoreRuntime.Core21));
272+
Job.Default.WithRuntime(CoreRuntime.Core80));
273273

274274
foreach (var added in AddLeftToTheRightAndRightToTheLef(configWithTwoStandardJobs, configWithMutatorJob))
275275
{

tests/BenchmarkDotNet.Tests/Configs/JobTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public static void Test06CharacteristicHacks()
403403
[Fact]
404404
public static void MutatorAppliedToOtherJobOverwritesOnlyTheConfiguredSettings()
405405
{
406-
var jobBefore = Job.Default.WithRuntime(CoreRuntime.Core30); // this is a default job with Runtime set to Core
406+
var jobBefore = Job.Default.WithRuntime(CoreRuntime.Core80); // this is a default job with Runtime set to Core
407407
var copy = jobBefore.UnfreezeCopy();
408408

409409
Assert.False(copy.HasValue(RunMode.MaxIterationCountCharacteristic));

tests/BenchmarkDotNet.Tests/CsProjGeneratorTests.cs

+10-10
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class CsProjGeneratorTests
2626

2727
[Theory]
2828
[InlineData("net471", false)]
29-
[InlineData("netcoreapp3.0", true)]
29+
[InlineData("netcoreapp3.1", true)]
3030
public void ItsPossibleToCustomizeProjectSdkBasedOnProjectSdkFromTheProjectFile(string targetFrameworkMoniker, bool isNetCore)
3131
{
3232
const string withCustomProjectSdk = @"
@@ -41,7 +41,7 @@ public void ItsImpossibleToCustomizeProjectSdkForFullFrameworkAppsBasedOnTheImpo
4141
{
4242
const string withCustomProjectImport = @"
4343
<Project Sdk=""Microsoft.NET.Sdk"">
44-
<Import Sdk=""Microsoft.NET.Sdk.WindowsDesktop"" Project=""Sdk.props"" Condition=""'$(TargetFramework)'=='netcoreapp3.0'""/>
44+
<Import Sdk=""Microsoft.NET.Sdk.WindowsDesktop"" Project=""Sdk.props"" Condition=""'$(TargetFramework)'=='netcoreapp3.1'""/>
4545
</Project>
4646
";
4747
AssertParsedSdkName(withCustomProjectImport, "net471", "Microsoft.NET.Sdk", false);
@@ -52,10 +52,10 @@ public void ItsPossibleToCustomizeProjectSdkForNetCoreAppsBasedOnTheImportOfSdk(
5252
{
5353
const string withCustomProjectImport = @"
5454
<Project Sdk=""Microsoft.NET.Sdk"">
55-
<Import Sdk=""Microsoft.NET.Sdk.WindowsDesktop"" Project=""Sdk.props"" Condition=""'$(TargetFramework)'=='netcoreapp3.0'""/>
55+
<Import Sdk=""Microsoft.NET.Sdk.WindowsDesktop"" Project=""Sdk.props"" Condition=""'$(TargetFramework)'=='netcoreapp3.1'""/>
5656
</Project>
5757
";
58-
AssertParsedSdkName(withCustomProjectImport, "netcoreapp3.0", "Microsoft.NET.Sdk.WindowsDesktop", true);
58+
AssertParsedSdkName(withCustomProjectImport, "netcoreapp3.1", "Microsoft.NET.Sdk.WindowsDesktop", true);
5959
}
6060

6161
[AssertionMethod]
@@ -87,7 +87,7 @@ public void UseWpfSettingGetsCopied()
8787
</PropertyGroup>
8888
</Project>
8989
";
90-
var sut = new CsProjGenerator("netcoreapp3.0", null, null, null, true);
90+
var sut = new CsProjGenerator("netcoreapp3.1", null, null, null, true);
9191

9292
var xmlDoc = new XmlDocument();
9393
xmlDoc.LoadXml(withUseWpfTrue);
@@ -117,7 +117,7 @@ public void SettingsFromPropsFileImportedUsingAbsolutePathGetCopies()
117117
<Import Project=""{propsFilePath}"" />
118118
</Project>";
119119

120-
var sut = new CsProjGenerator("netcoreapp3.0", null, null, null, true);
120+
var sut = new CsProjGenerator("netcoreapp3.1", null, null, null, true);
121121

122122
var xmlDoc = new XmlDocument();
123123
xmlDoc.LoadXml(importingAbsolutePath);
@@ -149,7 +149,7 @@ public void SettingsFromPropsFileImportedUsingRelativePathGetCopies()
149149
<Import Project="".{Path.DirectorySeparatorChar}test.props"" />
150150
</Project>";
151151

152-
var sut = new CsProjGenerator("netcoreapp3.0", null, null, null, true);
152+
var sut = new CsProjGenerator("netcoreapp3.1", null, null, null, true);
153153

154154
var xmlDoc = new XmlDocument();
155155
xmlDoc.LoadXml(importingRelativePath);
@@ -171,7 +171,7 @@ public void RuntimeHostConfigurationOptionIsCopied()
171171
{runtimeHostConfigurationOptionChunk}
172172
</Project>";
173173

174-
var sut = new CsProjGenerator("netcoreapp3.0", null, null, null, true);
174+
var sut = new CsProjGenerator("netcoreapp3.1", null, null, null, true);
175175

176176
var xmlDoc = new XmlDocument();
177177
xmlDoc.LoadXml(source);
@@ -196,7 +196,7 @@ public void TheDefaultFilePathShouldBeUsedWhenAnAssemblyLocationIsEmpty()
196196
var benchmarkCase = BenchmarkCase.Create(target, Job.Default, null, config);
197197

198198
var benchmarks = new[] { new BenchmarkBuildInfo(benchmarkCase, config.CreateImmutableConfig(), 999) };
199-
var projectGenerator = new SteamLoadedBuildPartition("netcoreapp3.0", null, null, null, true);
199+
var projectGenerator = new SteamLoadedBuildPartition("netcoreapp3.1", null, null, null, true);
200200
string binariesPath = projectGenerator.ResolvePathForBinaries(new BuildPartition(benchmarks, new Resolver()), programName);
201201

202202
string expectedPath = Path.Combine(Path.Combine(Directory.GetCurrentDirectory(), "BenchmarkDotNet.Bin"), programName);
@@ -210,7 +210,7 @@ public void TestAssemblyFilePathIsUsedWhenTheAssemblyLocationIsNotEmpty()
210210
var target = new Descriptor(MockFactory.MockType, MockFactory.MockMethodInfo);
211211
var benchmarkCase = BenchmarkCase.Create(target, Job.Default, null, ManualConfig.CreateEmpty().CreateImmutableConfig());
212212
var benchmarks = new[] { new BenchmarkBuildInfo(benchmarkCase, ManualConfig.CreateEmpty().CreateImmutableConfig(), 0) };
213-
var projectGenerator = new SteamLoadedBuildPartition("netcoreapp3.0", null, null, null, true);
213+
var projectGenerator = new SteamLoadedBuildPartition("netcoreapp3.1", null, null, null, true);
214214
var buildPartition = new BuildPartition(benchmarks, new Resolver());
215215
string binariesPath = projectGenerator.ResolvePathForBinaries(buildPartition, programName);
216216

tests/BenchmarkDotNet.Tests/Reports/SummaryTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void SummaryWithFailureReportDoesNotThrowNre()
3535
private static IConfig CreateConfig()
3636
{
3737
// We use runtime as selector later. It is chosen as selector just to be close to initial issue. Nothing particularly special about it.
38-
Job coreJob = new Job(Job.Default).WithRuntime(CoreRuntime.Core20).ApplyAndFreeze(RunMode.Dry);
38+
Job coreJob = new Job(Job.Default).WithRuntime(CoreRuntime.Core80).ApplyAndFreeze(RunMode.Dry);
3939
Job clrJob = new Job(Job.Default).WithRuntime(ClrRuntime.Net462).ApplyAndFreeze(RunMode.Dry);
4040
return ManualConfig.Create(DefaultConfig.Instance).AddJob(coreJob).AddJob(clrJob);
4141
}

tests/BenchmarkDotNet.Tests/Running/BenchmarkConverterTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void JobMutatorsApplySettingsToAllNonMutatorJobs()
135135
typeof(WithMutator),
136136
DefaultConfig.Instance
137137
.AddJob(Job.Default.WithRuntime(ClrRuntime.Net462))
138-
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core21)));
138+
.AddJob(Job.Default.WithRuntime(CoreRuntime.Core80)));
139139

140140
Assert.Equal(2, info.BenchmarksCases.Length);
141141
Assert.All(info.BenchmarksCases, benchmark => Assert.Equal(int.MaxValue, benchmark.Job.Run.MaxIterationCount));

0 commit comments

Comments
 (0)