Skip to content

Commit

Permalink
Updated OEDL of exp3 and instructions of exp2
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryr committed Oct 16, 2014
1 parent 0fc8190 commit 02fa106
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gec21_oedl_tutorial/tutorial_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ For specific help on using LabWiki, please refer to the [LabWiki introduction pa

![Experiment 2 Result Screenshot](https://raw.githubusercontent.com/mytestbed/gec_demos_tutorial/master/gec21_oedl_tutorial/tutorial_2.fig5.png)

- You may interact to with the graph, e.g. tick or un-tick the legend's keys to display only results from the first or/and second resource, hover the pointer above a graph point to display the underlying data point, drag-and-drop the graph via its icon to the "Plan" panel as described in the [LabWiki introduction page](http://groups.geni.net/geni/wiki/GEC21Agenda/OEDL/Introduction#Execute)
- You may interact to with the graph, e.g. hover the pointer above a graph point to display the underlying data point, drag-and-drop the graph via its icon to the "Plan" panel as described in the [LabWiki introduction page](http://groups.geni.net/geni/wiki/GEC21Agenda/OEDL/Introduction#Execute)

- The complete data set holding the measurements collected from this experiment is stored in an SQL database. You can retrieve a copy of that database by clicking on the 'Database Dump' buttom in the 'Execute' panel. The format of that copy is depends on your LabWiki's deployment configuration. It could be an iRODS dump, a Zipped archive of CSV files, a SQLite3 dump or a PostgreSQL dump. By default, it is a PostgreSQL dump.

Expand Down
36 changes: 24 additions & 12 deletions gec21_oedl_tutorial/tutorial_3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# executed.
#
# - we start by getting the list of resources provisioned for our slice
# - then for each resource, we check that it is a 'node' type of resoures
# - if so, we create a new group for that node resources & add a ping app to it
# - we filter that list of resources to only retain the 'node' ones
# - then we randomly pick a few of these nodes
# - finally, we create a new group with these randomly picked nodes and
# associate a ping app to them
#
loadOEDL('https://raw.githubusercontent.com/mytestbed/oml4r/master/omf/ping-oml2.rb')

Expand Down Expand Up @@ -37,23 +39,33 @@
# "type": "node"
#
available_resources = getResources()
nodes = available_resources.map { |res| res.omf_id if res.type == 'node' }.compact
random_nodes = nodes.sample(2)

available_resources.each do |res|
if res.type == 'node'
info "Got a new resource from Slice: #{res.omf_id} - #{res.type}"
defGroup("Worker"+res.omf_id , res.omf_id) do |group|
group.addApplication("ping") do |app|
app.setProperty('dest_addr', property.target)
app.measure('ping', samples: 1)
end
end
info "------ Found #{available_resources.length} available resources"
info "------ Including #{nodes.length} available nodes"
random_nodes.map { |n| info "------ Randomly picked: #{n}" }

defGroup("Random_Workers", random_nodes) do |group|
group.addApplication("ping") do |app|
app.setProperty('dest_addr', property.target)
app.measure('ping', samples: 1)
end
end

onEvent :ALL_UP_AND_INSTALLED do
onEvent :ALL_UP_AND_INSTALLED do
allGroups.startApplications
after 20 do
allGroups.stopApplications
Experiment.done
end
end

defGraph 'Workers' do |g|
g.ms('ping').select {[ oml_ts_client.as(:time), :rtt, oml_sender_id.as(:name) ]}
g.caption "Ping RTT vs Time, for each Workers"
g.type 'line_chart3'
g.mapping :x_axis => :time, :y_axis => :rtt, :group_by => :name
g.xaxis :legend => 'time [s]'
g.yaxis :legend => 'Ping RTT [ms]', :ticks => {:format => 's'}
end

0 comments on commit 02fa106

Please sign in to comment.