-
Notifications
You must be signed in to change notification settings - Fork 1k
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
added real UID to ActorPathBenchmarks
#6276
added real UID to ActorPathBenchmarks
#6276
Conversation
While working on akkadotnet#6195 I realized that none of those `ActorPath`s actually have a set UID, thus we're missing that entire facet from both the parsing and serialization benchmarks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll notice that the parsing and serialization overhead increase linearly with the size of the UID - this indicates to me that we're now correctly factoring it into our benchmarks whereas we were not doing this properly before.
private string _actorPathStr; | ||
|
||
[Params(1, 100000, int.MaxValue)] | ||
public int Uid { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parameterize the UID using increasing lengths - int.MaxValue
is the upper limit of what the UID function will produce in v1.4:
akka.net/src/core/Akka/Actor/ActorCell.cs
Lines 321 to 329 in 680e101
private static long NewUid() | |
{ | |
// Note that this uid is also used as hashCode in ActorRef, so be careful | |
// to not break hashing if you change the way uid is generated | |
var uid = ThreadLocalRandom.Current.Next(); | |
while (uid == UndefinedUid) | |
uid = ThreadLocalRandom.Current.Next(); | |
return uid; | |
} |
_childPath = x / "parent" / "child"; | ||
var parentPath = x / "parent"; | ||
_childPath = new ChildActorPath(parentPath, "child", Uid); | ||
_actorPathStr = _childPath.ToSerializationFormat(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have the string we parse be produced by the absolute path of the ChildActorPath
we use for the other tests, including the UID.
While working on akkadotnet#6195 I realized that none of those `ActorPath`s actually have a set UID, thus we're missing that entire facet from both the parsing and serialization benchmarks.
* cleaned up duplicate System.Collections.Immutable package reference (#6264) also standardized all System.* packages on a common version * converted build system to .NET 7.0 (#6263) * converted build system to .NET 7.0 * upgrade to Incrementalist.Cmd v0.8.0 * upgraded MNTR to support .NET 7.0 * fixed build system to target .NET 7.0 * upgrade to latest version of DocFx * add .NET 6 SDK back to build system * fixed HyperionConfigTests * Akka.Streams: `ReuseLatest` stage to repeatedly emit the most recent value until a newer one is pushed (#6262) * code cleanup in Akka.Streams `Attributes` * added `RepeatPrevious{T}` stage * WIP - debugging `RepeatPreviousSpecs` * fixed tests and added documentation * fixed documentation * API approvals * fixed markdown linting * removed `SwapPrevious<T>` delegate. * renamed stage from `RepeatPrevious` to `ReuseLatest` * remove BDN results * added real UID to `ActorPathBenchmarks` (#6276) While working on #6195 I realized that none of those `ActorPath`s actually have a set UID, thus we're missing that entire facet from both the parsing and serialization benchmarks. * Enable dynamic PGO for RemotePingPong and PingPong (#6277) * eliminate `ActorPath.ToSerializationFormat` UID allocations (#6195) * eliminate `ActorPath.ToSerializationFormat` UID allocations Used some more `Span<char>` magic to avoid additional allocations when string-ifying `ActorPath` components. * adding `SpanHacks` benchmarks * sped up `Int64SizeInCharacters` * added `TryFormat` benchmarks * fixed n+1 error in jump table * cleaned up `TryFormat` inside `SpanHacks` * fixed `SpanHacks` index calculation * removed BDN results * Update SpanHacks.cs * compilation fixes and V1.5 api approval
Changes
While working on #6195 I realized that none of those
ActorPath
s actually have a set UID, thus we're missing that entire facet from both the parsing and serialization benchmarks.Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
Latest
v1.4
Benchmarks