Skip to content

Commit

Permalink
changed job configuration for ActorMemoryFootprintBenchmark (#5048)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored May 28, 2021
1 parent 1938a20 commit 98ef574
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@
using Akka.Actor;
using Akka.Benchmarks.Configurations;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Engines;

namespace Akka.Benchmarks.Actor
{
[Config(typeof(MicroBenchmarkConfig))]
[SimpleJob(RunStrategy.Monitoring, targetCount: 25, warmupCount: 5)]
public class ActorMemoryFootprintBenchmark
{
public ActorSystem Sys;
public Props Props;

[Params(10_000)]
public int SpawnCount { get; set; }

[GlobalSetup]
public void Setup()
{
Expand All @@ -39,7 +44,8 @@ protected override void OnReceive(object message)
[Benchmark]
public void SpawnActor()
{
Sys.ActorOf(Props);
for(var i = 0; i < SpawnCount; i++)
Sys.ActorOf(Props);
}

[GlobalCleanup]
Expand Down

0 comments on commit 98ef574

Please sign in to comment.