5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# 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
|