dplyukhin / UIGC

A garbage collector for Akka actors!
Other
4 stars 2 forks source link

Random Graphs Benchmark Implementation #22

Closed dplyukhin closed 4 years ago

dplyukhin commented 4 years ago

Continuation of #17. In the random graphs benchmark, actors can do 5 things:

Whenever an actor gets a message, it generates M random numbers between 0 and 1 (where M is a configurable fixed parameter). Using each random number, it decides which of the 5 actions above to perform. The benchmark terminates when N actors have been spawned (where N is a configurable parameter).

To detect when N actors have been spawned, we use a CountDownLatch initialized to N; each time an actor is spawned, the counter is decremented. The main thread stops the benchmark when the counter hits 0.

Initially, we just have one actor (a receptionist). We send it P Ping messages (where P is some large-ish configurable parameter like 100). This will cause it to start spawning actors and sending messages and etc.

Implementation