Changes between Version 7 and Version 8 of GEC18Agenda/LabWikiAndOEDL/Experiment1


Ignore:
Timestamp:
10/16/13 18:21:28 (6 years ago)
Author:
thierry.rakotoarivelo@nicta.com.au
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC18Agenda/LabWikiAndOEDL/Experiment1

    v7 v8  
    1919[[Image(wiki:GENIExperimenter/Tutorials/Graphics:design_on.png, 76)]]
    2020
    21 * First login into LabWiki as described in the [wiki:GEC18Agenda/LabWikiAndOEDL/Introduction previous page]
     21 For help on all actions regarding !LabWiki, please refer to the [wiki:GEC18Agenda/LabWikiAndOEDL/Introduction previous page]
     22
     23 1.1. First, if you have not done it yet, login into !LabWiki
     24
     25 1.2. Create a new experiment file with the name of your choice
     26
     27 1.3.  Cut-and-paste the following experiment description into that file, then save it
     28    {{{
     29defProperty('resource1', "your_resource_ID", "ID of a resource")
     30defProperty('resource2', "your_resource_ID", "ID of a resource")
     31
     32defApplication('ping') do |app|
     33  app.description = 'Simple Definition for the ping-oml2 application'
     34  app.binary_path = '/usr/bin/ping-oml2'
     35  app.defProperty('target', 'Address to ping', '', {:type => :string})
     36  app.defProperty('count', 'Number of times to ping', '-c', {:type => :integer})
     37  app.defMeasurement('ping') do |m|
     38    m.defMetric('dest_addr',:string)
     39    m.defMetric('ttl',:uint32)
     40    m.defMetric('rtt',:double)
     41    m.defMetric('rtt_unit',:string)
     42  end
     43  app.defMeasurement('rtt_stats') do |m|
     44    m.defMetric('min',:double)
     45    m.defMetric('avg',:double)
     46    m.defMetric('max',:double)
     47    m.defMetric('mdev',:double)
     48    m.defMetric('rtt_unit',:string)
     49  end
     50end
     51
     52defGroup('First_Peer', property.resource1) do |g|
     53  g.net.e1.ip = "192.168.100.100/24"
     54  g.addApplication("ping") do |app|
     55    app.setProperty('target', '192.168.100.200')
     56    app.setProperty('count', 10)
     57    app.measure('ping', :samples => 1)
     58    app.measure('rtt_stats', :samples => 1)
     59  end
     60end
     61 
     62defGroup('Second_Peer', property.resource2) do |g|
     63  g.net.e1.ip = "192.168.100.200/24"
     64  g.addApplication("ping") do |app|
     65    app.setProperty('target', '192.168.100.100')
     66    app.setProperty('count', 15)
     67    app.measure('ping', :samples => 1)
     68    app.measure('rtt_stats', :samples => 1)
     69  end
     70end
     71
     72onEvent(:ALL_UP_AND_INSTALLED) do |event|
     73  info "This is my first OMF experiment"
     74  group('First_Peer').startApplications
     75  after 5.seconds do
     76    group('Second_Peer').startApplications
     77  end
     78  after 30.seconds do
     79    Experiment.done
     80  end
     81end
     82
     83defGraph 'RTT1' do |g|
     84  g.ms('ping').select {[ :oml_sender_id, :oml_ts_client, :oml_ts_server, :rtt ]}
     85  g.caption "Round Trip Time (RTT) reported by each resource"
     86  g.type 'line_chart3'
     87  g.mapping :x_axis => :oml_ts_client, :y_axis => :rtt, :group_by => :oml_sender_id
     88  g.xaxis :legend => 'time [s]'
     89  g.yaxis :legend => 'RTT [ms]', :ticks => {:format => 's'}
     90end
     91
     92defGraph 'RTT2' do |g|
     93  g.ms('rtt_stats').select {[ :oml_sender_id, :avg ]}
     94  g.caption "RTT Comparison Between Resources [ms]"
     95  g.type 'pie_chart2'
     96  g.mapping :value => :avg, :label => :oml_sender_id
     97end
     98    }}}
     99
     100
     101
     102
    22103
    23104== Part 2 - Execute ==