1 | ###Benchmark tests ##################################
|
---|
2 | # The purpose of this experiment is to benchmark the node CPU
|
---|
3 | # capabilities in terms of the maximum offered load that it can
|
---|
4 | # generate and consume on the wireless 802.11a link in ad-hoc mode
|
---|
5 |
|
---|
6 | # It has one sender and one receiver
|
---|
7 | # Sender, Receiver - Wireless interface
|
---|
8 | # UDP flow at 50Mbps
|
---|
9 | # 802.11a Channel 64 with autorate and MAC retries on
|
---|
10 | # Receiver reports throughput, jitter and packet loss per second
|
---|
11 | # Iperf traffic generator
|
---|
12 | ############################################################
|
---|
13 |
|
---|
14 | Experiment.name = "iperf-udp"
|
---|
15 | Experiment.project = "orbit:tutorial"
|
---|
16 |
|
---|
17 | #
|
---|
18 | # Define nodes used in experiment
|
---|
19 | #
|
---|
20 | ###########################################
|
---|
21 | # Sender definition and configuration
|
---|
22 | ###########################################
|
---|
23 | defNodes('sender', [4,1]) {|node|
|
---|
24 | node.image = nil # assume the right image to be on disk
|
---|
25 | # use prototype "sender"
|
---|
26 | # and set it's property "destinationHost" to
|
---|
27 | # the receiver node
|
---|
28 | # and bind the remaining properties to the
|
---|
29 | # experiment property space
|
---|
30 | node.prototype("test:proto:iperfudpsender", {
|
---|
31 | 'client' => '192.168.4.3', #Send to
|
---|
32 | 'use_udp' => nil, #UDP client
|
---|
33 | 'sender_rate' => '50M', #Input offered load (bits per sec)
|
---|
34 | 'len' => 1400 #Payload length (bytes)
|
---|
35 | })
|
---|
36 | node.net.w0.ip = '%192.168.%x.%y'
|
---|
37 | node.net.w0.mode = 'ad-hoc'
|
---|
38 | node.net.w0.essid = 'thrutest'
|
---|
39 | node.net.w0.type = 'a'
|
---|
40 | node.net.w0.channel = 64
|
---|
41 |
|
---|
42 | }
|
---|
43 | ###########################################
|
---|
44 | # Receiver definition and configuration
|
---|
45 | ###########################################
|
---|
46 |
|
---|
47 | defNodes('receiver', [4,3]) {|node|
|
---|
48 | node.image = nil # assume the right image to be on disk
|
---|
49 | node.prototype("test:proto:iperfudpreceiver" , {
|
---|
50 | 'server' => nil, # Server
|
---|
51 | 'use_udp' => nil, # Use UDP
|
---|
52 | 'len' => 1400, #Payload length (bytes)
|
---|
53 | 'report_interval' => 10 #Report interval(seconds)
|
---|
54 | })
|
---|
55 | node.net.w0.ip = '%192.168.%x.%y'
|
---|
56 | node.net.w0.mode = 'ad-hoc'
|
---|
57 | node.net.w0.essid = 'thrutest'
|
---|
58 | node.net.w0.type = 'a'
|
---|
59 | node.net.w0.channel = 64
|
---|
60 |
|
---|
61 | }
|
---|
62 |
|
---|
63 | ###########################################
|
---|
64 | # When nodeAgents have reported "OK" to
|
---|
65 | # the nodeHandler start the application
|
---|
66 | ###########################################
|
---|
67 | whenAllInstalled() {|node|
|
---|
68 |
|
---|
69 | nodes('receiver').startApplications
|
---|
70 |
|
---|
71 | wait 10
|
---|
72 | nodes('sender').startApplications
|
---|
73 | wait 60
|
---|
74 |
|
---|
75 | allNodes.stopApplications
|
---|
76 |
|
---|
77 |
|
---|
78 | Experiment.done
|
---|
79 |
|
---|
80 | }
|
---|