Module caminos_lib::traffic

source ·
Expand description

A Traffic defines the way their tasks generate load. In the root traffic of a simulation there should be as many tasks as servers. Traffics with other number of tasks can be combined into a such main traffic.

see new_traffic for documentation on the configuration syntax of predefined traffics.

Structs

  • In this traffic each task has a limited amount of data that can send over the amount it has received. For example, with bound=1 after a task sends a message it must wait to receive one. And if received x messages then it may generate x+bound before having to wait. All messages have same size, follow the same pattern.
  • Initialize an amount of messages to send from each task. The traffic will be considered complete when all tasks 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.
  • Like the Burst pattern, but generating messages from different patterns and with different message sizes.
  • The tasks in a ProductTraffic are grouped in blocks of size block_size. The traffic each block generates follows the underlying block_traffic Traffic, but with the group of destination being indicated by the global_pattern. First check whether a transformation at the Pattern level is enough; specially see the crate::pattern::ProductPattern 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 task that consumed the action message. The destination of the reaction message is independent of the origin of the action message. The two traffics must involve the same number of tasks.
  • A sequence of traffics. When a traffic declares itself to be finished moves to the next.
  • Traffic which is another shifted by some amount of tasks. First check whether a transformation at the Pattern level is enough. The task index+shift will be seen as just index by the inner traffic.
  • Only allowed tasks in range will generate messages. The messages can go out of the given range.
  • Traffic which is the sum of a list of other 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. This traffics is useful to make sequences of traffics that do no end by themselves.
  • Applies a map over the tasks of a traffic. The source and destination sets may differ. A simple example is to shuffle the tasks in a application, as in the following configuration.

Enums

Traits

  • A traffic to be offered to a network. Each task may generate and consume messages. Each should call should_generate every cycle unless it is unable to store more messages.

Functions