To evaluate the performance of our GC, we need a benchmark that randomly spawns lots of actors and creates lots of actor garbage. The first step is to create a BenchmarkActor behavior with the following API:
Private fields:
acquaintances is a list of references to other actors
Message API:
Link(ref: ActorRef): add ref to this.acquaintances
Ping(): do nothing
Methods:
spawnActor() spawns a BenchmarkActor and adds the resulting reference to this.acquaintances
forgetActor(ref: ActorRef) removes ref from this.acquaintances
linkActors(owner: ActorRef, target: ActorRef) sends a Link message to owner, giving it a reference to target
ping(ref: ActorRef) sends an empty Ping message to ref.
We need to create a benchmark actor for both akka-gc and regular akka. Adding randomness will be a separate issue.
To evaluate the performance of our GC, we need a benchmark that randomly spawns lots of actors and creates lots of actor garbage. The first step is to create a
BenchmarkActor
behavior with the following API:Private fields:
acquaintances
is a list of references to other actorsMessage API:
Link(ref: ActorRef)
: addref
tothis.acquaintances
Ping()
: do nothingMethods:
spawnActor()
spawns aBenchmarkActor
and adds the resulting reference tothis.acquaintances
forgetActor(ref: ActorRef)
removesref
fromthis.acquaintances
linkActors(owner: ActorRef, target: ActorRef)
sends aLink
message toowner
, giving it a reference totarget
ping(ref: ActorRef)
sends an emptyPing
message toref
.We need to create a benchmark actor for both akka-gc and regular akka. Adding randomness will be a separate issue.