Actor | Sent | Received | Send Rate | Receive Rate | Activity |
---|---|---|---|---|---|
left | 3 | 0 | 10.0 msg/s | 0.0 msg/s | 3 total |
right | 0 | 3 | 0.0 msg/s | 10.0 msg/s | 3 total |
This is the Elixir code that defines the actor simulation model:
simulation =
ActorSimulation.new()
|> ActorSimulation.add_actor(:left,
send_pattern: {:periodic, 100, :msg},
targets: [:right]
)
|> ActorSimulation.add_actor(:right)
|> ActorSimulation.run(duration: 300)