Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sharding benchmark streaming message counts #6866

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@
using Akka.Routing;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Diagnostics.dotTrace;
using BenchmarkDotNet.Engines;
using static Akka.Cluster.Benchmarks.Sharding.ShardingHelper;

namespace Akka.Cluster.Benchmarks.Sharding
{
[DotTraceDiagnoser]
//[DotTraceDiagnoser]
[Config(typeof(MonitoringConfig))]
[SimpleJob(RunStrategy.Monitoring, launchCount: 10, warmupCount: 10)]
public class ShardMessageRoutingBenchmarks
{
[Params(StateStoreMode.Persistence, StateStoreMode.DData)]
public StateStoreMode StateMode;

public const int MsgCount = 10000;
public const int MsgCount = 10_000;

public const int BatchSize = 20;

Expand Down Expand Up @@ -149,7 +151,7 @@ public async Task SingleRequestResponseToLocalEntity()
await _shardRegion1.Ask<ShardedMessage>(_messageToSys1);
}

[Benchmark(OperationsPerInvoke = MsgCount * BatchSize)]
[Benchmark(OperationsPerInvoke = MsgCount)]
public async Task StreamingToLocalEntity()
{
_batchActor.Tell(new BulkSendActor.BeginSend(_messageToSys1, _shardRegion1, BatchSize));
Expand All @@ -171,7 +173,7 @@ public async Task SingleRequestResponseToRemoteEntityWithLocalProxy()
await _localRouter.Ask<ShardedMessage>(new SendShardedMessage(_messageToSys2.EntityId, _messageToSys2));
}

[Benchmark(OperationsPerInvoke = MsgCount*BatchSize)]
[Benchmark(OperationsPerInvoke = MsgCount)]
public async Task StreamingToRemoteEntity()
{
_batchActor.Tell(new BulkSendActor.BeginSend(_messageToSys2, _shardRegion1, BatchSize));
Expand Down