diff --git a/.gitignore b/.gitignore
index c4e1346ef6d..a246deaade0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,10 @@ PerfResults/
# BenchmarkDotNet files
[rR]esults/
+# dotTrace files
+*.dtp
+*.dtp.*
+
# Visual Studo 2015 cache/options directory
.vs/
diff --git a/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj b/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj
index 1e6d76d303c..2a89bc8a0ef 100644
--- a/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj
+++ b/src/benchmark/Akka.Benchmarks/Akka.Benchmarks.csproj
@@ -7,6 +7,7 @@
+
diff --git a/src/benchmark/Akka.Cluster.Benchmarks/Akka.Cluster.Benchmarks.csproj b/src/benchmark/Akka.Cluster.Benchmarks/Akka.Cluster.Benchmarks.csproj
index 9eba3f3eff2..f11de3a8815 100644
--- a/src/benchmark/Akka.Cluster.Benchmarks/Akka.Cluster.Benchmarks.csproj
+++ b/src/benchmark/Akka.Cluster.Benchmarks/Akka.Cluster.Benchmarks.csproj
@@ -6,6 +6,7 @@
+
diff --git a/src/benchmark/Akka.Cluster.Benchmarks/Sharding/ShardMessageRoutingBenchmarks.cs b/src/benchmark/Akka.Cluster.Benchmarks/Sharding/ShardMessageRoutingBenchmarks.cs
index 4067bbec1f2..0cd5e38311f 100644
--- a/src/benchmark/Akka.Cluster.Benchmarks/Sharding/ShardMessageRoutingBenchmarks.cs
+++ b/src/benchmark/Akka.Cluster.Benchmarks/Sharding/ShardMessageRoutingBenchmarks.cs
@@ -14,20 +14,21 @@
using Akka.Cluster.Sharding;
using Akka.Routing;
using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Diagnostics.dotTrace;
using static Akka.Cluster.Benchmarks.Sharding.ShardingHelper;
namespace Akka.Cluster.Benchmarks.Sharding
{
+ [DotTraceDiagnoser]
[Config(typeof(MonitoringConfig))]
public class ShardMessageRoutingBenchmarks
{
[Params(StateStoreMode.Persistence, StateStoreMode.DData)]
public StateStoreMode StateMode;
- [Params(10000)]
- public int MsgCount;
+ public const int MsgCount = 10000;
- public int BatchSize = 20;
+ public const int BatchSize = 20;
private ActorSystem _sys1;
private ActorSystem _sys2;
@@ -141,21 +142,21 @@ public void PerIteration()
_batchActor = _sys1.ActorOf(Props.Create(() => new BulkSendActor(tcs, MsgCount)));
}
- [Benchmark]
+ [Benchmark(OperationsPerInvoke = MsgCount)]
public async Task SingleRequestResponseToLocalEntity()
{
for (var i = 0; i < MsgCount; i++)
await _shardRegion1.Ask(_messageToSys1);
}
- [Benchmark]
+ [Benchmark(OperationsPerInvoke = MsgCount * BatchSize)]
public async Task StreamingToLocalEntity()
{
_batchActor.Tell(new BulkSendActor.BeginSend(_messageToSys1, _shardRegion1, BatchSize));
await _batchComplete;
}
- [Benchmark]
+ [Benchmark(OperationsPerInvoke = MsgCount)]
public async Task SingleRequestResponseToRemoteEntity()
{
for (var i = 0; i < MsgCount; i++)
@@ -163,14 +164,14 @@ public async Task SingleRequestResponseToRemoteEntity()
}
- [Benchmark]
+ [Benchmark(OperationsPerInvoke = MsgCount)]
public async Task SingleRequestResponseToRemoteEntityWithLocalProxy()
{
for (var i = 0; i < MsgCount; i++)
await _localRouter.Ask(new SendShardedMessage(_messageToSys2.EntityId, _messageToSys2));
}
- [Benchmark]
+ [Benchmark(OperationsPerInvoke = MsgCount*BatchSize)]
public async Task StreamingToRemoteEntity()
{
_batchActor.Tell(new BulkSendActor.BeginSend(_messageToSys2, _shardRegion1, BatchSize));