dotnet / BenchmarkDotNet

Powerful .NET library for benchmarking
https://benchmarkdotnet.org
MIT License
10.5k stars 965 forks source link

CoreRT / NativeAOT version #1605

Closed HurricanKai closed 3 years ago

HurricanKai commented 3 years ago

As per this issue BDN is using an outdated version by default, and I've not been able to find a way to set the version manually.

adamsitnik commented 3 years ago

Hi @HurricanKai

I've sent a PR that updates the compiler version and feed address: #1606

In the meantime, you can use the following code to get it working:

var config = DefaultConfig.Instance
    .AddJob(Job.Default
        .WithRuntime(CoreRtRuntime.CoreRt50)
        .WithToolchain(CoreRtToolchain.CreateBuilder()
            .UseCoreRtNuGet(
                microsoftDotNetILCompilerVersion: "6.0.0-*",
                nuGetFeedUrl: "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json")
            .ToToolchain()));

BenchmarkSwitcher
    .FromAssembly(typeof(Program).Assembly)
    .Run(args, config);
HurricanKai commented 3 years ago

Awesome, thanks!