diff --git a/src/benchmark/Akka.Benchmarks/Actor/ActorPathBenchmarks.cs b/src/benchmark/Akka.Benchmarks/Actor/ActorPathBenchmarks.cs index b9885c1290c..94ced8d1449 100644 --- a/src/benchmark/Akka.Benchmarks/Actor/ActorPathBenchmarks.cs +++ b/src/benchmark/Akka.Benchmarks/Actor/ActorPathBenchmarks.cs @@ -5,6 +5,7 @@ // //----------------------------------------------------------------------- +using System; using Akka.Actor; using Akka.Benchmarks.Configurations; using BenchmarkDotNet.Attributes; @@ -20,18 +21,25 @@ public class ActorPathBenchmarks private Address _sysAdr = new Address("akka.tcp", "system", "127.0.0.1", 1337); private Address _otherAdr = new Address("akka.tcp", "system", "127.0.0.1", 1338); + private string _actorPathStr; + + [Params(1, 100000, int.MaxValue)] + public int Uid { get; set; } + [GlobalSetup] public void Setup() { x = new RootActorPath(_sysAdr, "user"); y = new RootActorPath(_sysAdr, "system"); - _childPath = x / "parent" / "child"; + var parentPath = x / "parent"; + _childPath = new ChildActorPath(parentPath, "child", Uid); + _actorPathStr = _childPath.ToSerializationFormat(); } [Benchmark] public ActorPath ActorPath_Parse() { - return ActorPath.Parse("akka.tcp://system/user/parent/child"); + return ActorPath.Parse(_actorPathStr); } [Benchmark]