Module caminos_lib::traffic [−][src]
Expand description
A Traffic defines the way load is generated by the servers.
see new_traffic
for documentation on the configuration syntax of predefined traffics.
Structs
Initialize an amount of messages to send from each server. The traffic will be considered complete when all servers have generated their messages and all of them have been consumed.
Traffic in which all messages have same size, follow the same pattern, and there is no change with time.
Divides the network in blocks and use a Traffic
inside blocks applying a global Pattern
among blocks.
First check whether a transformation at the Pattern
level is enough; specially see the Product
pattern.
Has a major traffic action_traffic
generated normally. When a message from this action_traffic
is consumed, the reaction_traffic
is requested for a message. This reaction message will be generated by the server that consumed the action message. The destination of the reaction message is independent of the origin of the action message.
Traffic which is another shifted by some amount of servers
First check whether a transformation at the Pattern
level is enough.
The server index+shit
will be seen as just index
by the inner traffic.
Only allow servers in range will generate messages. The messages can go out of the given range.
Traffic which is the sum of a list of oter traffics. While it will clearly work when the sum of the generation rates is at most 1, it should behave nicely enough otherwise.
Selects the traffic from a sequence depending on current cycle
Enums
Possible errors when trying to generate a message with a Traffic
.
Traits
A traffic to be offered to a network. Each server may generate and consume messages.
Each should call should_generate
every cycle unless it is unable to store more messages.
Functions
Build a new traffic.