-
-
Notifications
You must be signed in to change notification settings - Fork 969
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adding DotNetSDK Validation * Added support for Wasm and NativeAot * Added missing case statements * Code cleanup * Separated providers for .Net and .Net Framework. Added validation to MonoAotLLVMToolChain and CsProjClassicNetToolchain * Put code into static utility class. Updated toolchains * Updated validator and toolchains * Updated toolchains and framework validation
- Loading branch information
1 parent
f4c39ee
commit 59647c9
Showing
8 changed files
with
294 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 32 additions & 11 deletions
43
src/BenchmarkDotNet/Toolchains/MonoAotLLVM/MonoAotLLVMToolChain.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,45 @@ | ||
using BenchmarkDotNet.Characteristics; | ||
using BenchmarkDotNet.Running; | ||
using BenchmarkDotNet.Toolchains.DotNetCli; | ||
using BenchmarkDotNet.Validators; | ||
using System.Collections.Generic; | ||
|
||
namespace BenchmarkDotNet.Toolchains.MonoAotLLVM | ||
{ | ||
public class MonoAotLLVMToolChain : Toolchain | ||
{ | ||
public MonoAotLLVMToolChain(string name, IGenerator generator, IBuilder builder, IExecutor executor) | ||
private readonly string _customDotNetCliPath; | ||
|
||
public MonoAotLLVMToolChain(string name, IGenerator generator, IBuilder builder, IExecutor executor, string customDotNetCliPath) | ||
: base(name, generator, builder, executor) | ||
{ | ||
_customDotNetCliPath = customDotNetCliPath; | ||
} | ||
|
||
public static IToolchain From(NetCoreAppSettings netCoreAppSettings) | ||
=> new MonoAotLLVMToolChain(netCoreAppSettings.Name, | ||
new MonoAotLLVMGenerator(netCoreAppSettings.TargetFrameworkMoniker, | ||
netCoreAppSettings.CustomDotNetCliPath, | ||
netCoreAppSettings.PackagesPath, | ||
netCoreAppSettings.CustomRuntimePack, | ||
netCoreAppSettings.AOTCompilerPath, | ||
netCoreAppSettings.AOTCompilerMode), | ||
new DotNetCliBuilder(netCoreAppSettings.TargetFrameworkMoniker, | ||
netCoreAppSettings.CustomDotNetCliPath), | ||
new Executor()); | ||
=> new MonoAotLLVMToolChain(netCoreAppSettings.Name, | ||
new MonoAotLLVMGenerator(netCoreAppSettings.TargetFrameworkMoniker, | ||
netCoreAppSettings.CustomDotNetCliPath, | ||
netCoreAppSettings.PackagesPath, | ||
netCoreAppSettings.CustomRuntimePack, | ||
netCoreAppSettings.AOTCompilerPath, | ||
netCoreAppSettings.AOTCompilerMode), | ||
new DotNetCliBuilder(netCoreAppSettings.TargetFrameworkMoniker, | ||
netCoreAppSettings.CustomDotNetCliPath), | ||
new Executor(), | ||
netCoreAppSettings.CustomDotNetCliPath); | ||
|
||
public override IEnumerable<ValidationError> Validate(BenchmarkCase benchmarkCase, IResolver resolver) | ||
{ | ||
foreach (var validationError in base.Validate(benchmarkCase, resolver)) | ||
{ | ||
yield return validationError; | ||
} | ||
|
||
foreach (var validationError in DotNetSdkValidator.ValidateCoreSdks(_customDotNetCliPath, benchmarkCase)) | ||
{ | ||
yield return validationError; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.