Type | Method | Mean | Error | StdDev |
---|---|---|---|---|
Sleepc | TenMs | 14.41 ms | 24.05 ms | 1.359 ms |
Sleepb | HoundredMs | 106.27 ms | 53.07 ms | 2.999 ms |
Sleepa | ThousandMs | 1,006.44 ms | 117.93 ms | 6.663 ms |
Created
September 10, 2018 15:20
-
-
Save adamsitnik/77df3a41d18eedb2aceb589e43ed7263 to your computer and use it in GitHub Desktop.
summaryJoinOrderBy
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
using System; | |
using System.Linq; | |
using System.Threading; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Diagnosers; | |
using BenchmarkDotNet.Jobs; | |
using BenchmarkDotNet.Order; | |
using BenchmarkDotNet.Running; | |
namespace BenchmarkDotNet.Samples | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
=> BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, | |
DefaultConfig.Instance | |
.With(Job.ShortRun) | |
.With(new DefaultOrderer(SummaryOrderPolicy.FastestToSlowest))); | |
} | |
public class Sleepc { [Benchmark] public void TenMs() => Thread.Sleep(TimeSpan.FromMilliseconds(10)); } | |
public class Sleepb { [Benchmark] public void HoundredMs() => Thread.Sleep(TimeSpan.FromMilliseconds(100)); } | |
public class Sleepa { [Benchmark] public void ThousandMs() => Thread.Sleep(TimeSpan.FromMilliseconds(1000)); } | |
} |
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
dotnet run -c Release -f net46 -- -f BenchmarkDotNet.Samples.Sleep* --join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment