Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
1e1c65da7bed06e49cc82ba583f67c5a98725114
[simgrid.git] / examples / s4u / energy-link / s4u-energy-link.tesh
1 #!/usr/bin/env tesh
2
3 p Testing the mechanism for computing link energy consumption (using CM02 as a network model)
4
5 $ ${bindir:=.}/s4u-energy-link$EXEEXT ${platfdir}/energy_platform.xml  "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:CM02 --cfg=network/crosstraffic:no
6 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
7 > [  0.000000] (0:maestro@) Configuration change: Set 'network/crosstraffic' to 'no'
8 > [  0.000000] (0:maestro@) Activating the SimGrid link energy plugin
9 > [  0.000000] (1:sender@MyHost1) Send 25000 bytes, in 1 flows
10 > [  0.000000] (2:receiver@MyHost2) Receiving 1 flows ...
11 > [ 10.250000] (2:receiver@MyHost2) receiver done.
12 > [ 10.250000] (1:sender@MyHost1) sender done.
13 > [ 10.250000] (0:maestro@) Total energy over all links: 10.750000
14 > [ 10.250000] (0:maestro@) Energy consumption of link 'bus': 10.750000 Joules
15
16 p And now test with 500000 bytes
17
18 $ ${bindir:=.}/s4u-energy-link$EXEEXT ${platfdir}/energy_platform.xml 1 50000000 "--log=root.fmt:[%10.6r]%e(%i:%P@%h)%e%m%n" --cfg=network/model:CM02 --cfg=network/crosstraffic:no
19 > [  0.000000] (0:maestro@) Configuration change: Set 'network/model' to 'CM02'
20 > [  0.000000] (0:maestro@) Configuration change: Set 'network/crosstraffic' to 'no'
21 > [  0.000000] (0:maestro@) Activating the SimGrid link energy plugin
22 > [  0.000000] (1:sender@MyHost1) Send 50000000 bytes, in 1 flows
23 > [  0.000000] (2:receiver@MyHost2) Receiving 1 flows ...
24 > [510.000000] (2:receiver@MyHost2) receiver done.
25 > [510.000000] (1:sender@MyHost1) sender done.
26 > [510.000000] (0:maestro@) Total energy over all links: 1510.000000
27 > [510.000000] (0:maestro@) Energy consumption of link 'bus': 1510.000000 Joules