The stats
hook can be used to collect statistics about the co-simulation interface like:
- One way delay (OWD)
- Packet loss
- Packet reordering
- Sending rate
$ villas signal -r 1000 -l 10000 sine | villas hook -o verbose=true -o warmup=3000 stats
With network emulation
15 address = "127.0.0.1:12001",
22 delay = 100000, # in uS
23 jitter = 5000, # in uS
24 distribution = "normal"
In the first terminal:
$ villas signal -r 1000 sine | villas pipe etc/lab9_netem.conf udp_node1
In a second terminal:
$ villas pipe etc/lab9_netem.conf udp_node1 -x > delayed_data.dat
After a few seconds, press Ctrl-C to stop the processing. Now we can analyze the delay distribution of the received data:
$ villas hook -o verbose=true -o warmup=1000 stats < delayed_data.dat > /dev/null
For more details see Network Emulation
Go to [lab 10] =>(node-lab-10)