SimGrid
3.16
Versatile Simulation of Distributed Systems
|
Find the S4U example fitting your needs in the archive.
This section details how to run trace-driven simulations. It is very handy when you want to test an algorithm or protocol that only react to external events. For example, many P2P protocols react to user requests, but do nothing if there is no such event.
In such situations, you should write your protocol in C++, and separate the workload that you want to play onto your protocol in a separate text file. Declare a function handling each type of the events in your trace, register them using xbt_replay_action_register in your main, and then run the simulation.
Then, you can either have one trace file containing all your events, or a file per simulated process: the former may be easier to work with, but the second is more efficient on very large traces. Check also the tesh files in the example directories for details.