Skip to content

Conversation

@svick
Copy link
Contributor

@svick svick commented Jun 10, 2020

This changes the display for CsProjClassicNetToolchain, so that it properly shows the framework name, instead of just the TFM.

E.g. consider this benchmark:

[Config(typeof(Config))]
public unsafe class Toolchain
{
    private class Config : ManualConfig
    {
        public Config()
        {
            AddJob(Job.Default.WithToolchain(CsProjClassicNetToolchain.Net48));
            AddJob(Job.Default.WithToolchain(CsProjCoreToolchain.NetCoreApp31));
        }
    }

    [Benchmark]
    public void Sleep() => Thread.Sleep(1);
}

Before this change, its output is (notice the Toolchain column in the table):

// * Summary *

BenchmarkDotNet=v0.12.1.20200610-develop, OS=Windows 10.0.18362.836 (1903/May2019Update/19H1)
Intel Core i5-2300 CPU 2.80GHz (Sandy Bridge), 1 CPU, 4 logical and 4 physical cores
  [Host]     : .NET Framework 4.8 (4.8.4180.0), X64 RyuJIT
  Job-UPLABW : .NET Core 3.1.5 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.27001), X64 RyuJIT
  Job-JBFOWH : .NET Framework 4.8 (4.8.4180.0), X64 RyuJIT


| Method |        Job |     Toolchain |     Mean |     Error |    StdDev |
|------- |----------- |-------------- |---------:|----------:|----------:|
|  Sleep | Job-UPLABW | .NET Core 3.1 | 1.808 ms | 0.0332 ms | 0.0310 ms |
|  Sleep | Job-JBFOWH |         net48 | 1.783 ms | 0.0350 ms | 0.0612 ms |

After it, it's instead:

// * Summary *

BenchmarkDotNet=v0.12.1.20200610-develop, OS=Windows 10.0.18362.836 (1903/May2019Update/19H1)
Intel Core i5-2300 CPU 2.80GHz (Sandy Bridge), 1 CPU, 4 logical and 4 physical cores
  [Host]     : .NET Framework 4.8 (4.8.4180.0), X64 RyuJIT
  Job-UPLABW : .NET Core 3.1.5 (CoreCLR 4.700.20.26901, CoreFX 4.700.20.27001), X64 RyuJIT
  Job-RMSQHR : .NET Framework 4.8 (4.8.4180.0), X64 RyuJIT


| Method |        Job |          Toolchain |     Mean |     Error |    StdDev |
|------- |----------- |------------------- |---------:|----------:|----------:|
|  Sleep | Job-UPLABW |      .NET Core 3.1 | 1.762 ms | 0.0351 ms | 0.0444 ms |
|  Sleep | Job-RMSQHR | .NET Framework 4.8 | 1.710 ms | 0.0226 ms | 0.0188 ms |

Also, it changes the name for ClrRuntimes from e.g. ".NET 4.8" to the more correct ".NET Framework 4.8". (Which is especially important to differentiate them from .Net 5.0.)

Copy link
Member

@adamsitnik adamsitnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @svick !

@adamsitnik adamsitnik merged commit dbbab9a into dotnet:master Jun 10, 2020
@svick svick deleted the framework-name branch June 10, 2020 15:07
@AndreyAkinshin AndreyAkinshin added this to the v0.12.2 milestone Jun 10, 2020
naricc pushed a commit to naricc/BenchmarkDotNet that referenced this pull request Jun 23, 2020
Removed undeed changes.

Started work on wasm project generator.

Changes to wasm tool chain.

WasmGenerator, Executor.

Generate correct projecty file.

A bunch of hacks to make wasm work.

Changed wasm program.

Fixed project template.

Changes to avoid using features wasm doesn't support, and add wasm runtime.

Added WasmRuntime file.

Propagate parameters.

Removed swap files that shold not have been added in the first place.

Changes to support command line options.

Changed NetCoreAppSettings constructor.

Propagate command line options.

More work getting command line arguments to work.

More changes for command line arguments.

Changes to ignore wasm prefix in output.

Moved up Wasm in the selection of runtime.

Backing out debug changes.

Removed unneeded change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants