Skip to content

Commit 0774997

Browse files
russcamMpdreamz
authored andcommitted
Research benchmarking with BenchmarkDotNet
BenchmarkDotNet only runs against the dotnet CLI of dnx at the moment so cannot be used in our DNX solution
1 parent 153b0dd commit 0774997

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

paket.dependencies

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ nuget DiffPlex
1919
nuget JetBrains.Profiler.Kernel.Windows.Api
2020
nuget Humanizer
2121
nuget NDesk.Options
22+
nuget BenchmarkDotNet prerelease
2223

2324
//Rx-Main on its does not seem to work
2425
nuget Rx-Core

src/Tests/Program.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using BenchmarkDotNet.Configs;
6+
using BenchmarkDotNet.Running;
7+
using Tests.Document.Multiple.Bulk;
8+
using BenchmarkDotNet.Jobs;
9+
10+
namespace Tests
11+
{
12+
public class Program
13+
{
14+
public static void Main(string[] args)
15+
{
16+
var summary = BenchmarkRunner.Run<BulkApiTests>(new Config());
17+
}
18+
19+
class Config : ManualConfig
20+
{
21+
public Config()
22+
{
23+
Add(Job.AllJits);
24+
Add(Job.Dnx);
25+
Add(Job.Default.With(Mode.SingleRun).WithLaunchCount(1).WithWarmupCount(1).WithTargetCount(1));
26+
Add(Job.Default.With(BenchmarkDotNet.Jobs.Framework.Host).With(Runtime.Host).With(Platform.Host));
27+
}
28+
}
29+
}
30+
}

src/Tests/paket.references

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Rx-Linq
77
Rx-Main
88
Rx-PlatformServices
99
Bogus
10-
DiffPlex
10+
DiffPlex
11+
BenchmarkDotNet

0 commit comments

Comments
 (0)