class Network
Public Class Methods
perform(file, plot)
click to toggle source
# File lib/barrage/network.rb, line 5 def self.perform(file, plot) plot.title "Network throughput" plot.xlabel "time" plot.ylabel "throughput (mbps)" parsed = DstatParser.parse(file, 16) plot.data << Gnuplot::DataSet.new( [parsed[0], parsed[1]] ) do |ds| ds.title = "received" ds.with = "filledcurve linetype 7" ds.linewidth = 2 ds.using = "1:(\$2 / 125000)" end parsed = DstatParser.parse(file, 17) plot.data << Gnuplot::DataSet.new( [parsed[0], parsed[1]] ) do |ds| ds.title = "sent" ds.with = "filledcurve linetype 3" ds.linewidth = 2 ds.using = "1:(\$2 / 125000)" end end