david 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +1,29 @@
1
- concurrent,loss,throughput
2
- 10.0,0.0,5192.0
3
- 20.0,0.0,6229.33333
4
- 30.0,0.0,7727.66667
5
- 40.0,0.0,8624.33333
6
- 50.0,0.0,8949.0
7
- 60.0,0.0,9122.66667
8
- 70.0,0.0,9349.0
9
- 80.0,0.0,9672.66667
10
- 90.0,0.0,9836.66667
11
- 100.0,0.0,9978.0
12
- 200.0,0.0,10871.0
13
- 300.0,0.01345,10903.33333
14
- 400.0,0.07517,10819.66667
15
- 500.0,0.13742,10777.0
16
- 600.0,0.22956,10749.33333
17
- 700.0,0.31443,10773.66667
18
- 800.0,0.40563,10772.66667
19
- 900.0,0.48934,10780.33333
20
- 1000.0,0.59199,10720.33333
21
- 2000.0,1.52498,10651.0
22
- 3000.0,2.48929,10700.33333
23
- 4000.0,3.44407,10638.33333
24
- 5000.0,4.25959,10850.33333
25
- 6000.0,5.28891,10764.33333
26
- 7000.0,6.10506,10903.0
27
- 8000.0,7.1729,10730.66667
28
- 9000.0,7.99336,10855.0
29
- 10000.0,8.86836,10892.33333
1
+ concurrent,loss,throughput,sd
2
+ 10.0,0.0,5192.0,205.87537
3
+ 20.0,0.0,6229.33333,66.30401
4
+ 30.0,0.0,7727.66667,31.25522
5
+ 40.0,0.0,8624.33333,10.20893
6
+ 50.0,0.0,8949.0,80.13738
7
+ 60.0,0.0,9122.66667,10.40299
8
+ 70.0,0.0,9349.0,24.85961
9
+ 80.0,0.0,9672.66667,25.9401
10
+ 90.0,0.0,9836.66667,124.8261
11
+ 100.0,0.0,9978.0,24.34475
12
+ 200.0,0.0,10871.0,6.16441
13
+ 300.0,0.01345,10903.33333,22.291
14
+ 400.0,0.07517,10819.66667,21.66923
15
+ 500.0,0.13742,10777.0,71.51224
16
+ 600.0,0.22956,10749.33333,45.84273
17
+ 700.0,0.31443,10773.66667,29.4543
18
+ 800.0,0.40563,10772.66667,60.80753
19
+ 900.0,0.48934,10780.33333,15.54206
20
+ 1000.0,0.59199,10720.33333,52.47433
21
+ 2000.0,1.52498,10651.0,50.57667
22
+ 3000.0,2.48929,10700.33333,70.28197
23
+ 4000.0,3.44407,10638.33333,100.16764
24
+ 5000.0,4.25959,10850.33333,295.77168
25
+ 6000.0,5.28891,10764.33333,85.35937
26
+ 7000.0,6.10506,10903.0,214.97442
27
+ 8000.0,7.1729,10730.66667,32.14896
28
+ 9000.0,7.99336,10855.0,234.45398
29
+ 10000.0,8.86836,10892.33333,294.90601
@@ -15,6 +15,9 @@ Rails = rails$throughput
15
15
  df = data.frame(Concurrent, Rack, Rails)
16
16
  df.long = melt(df, id.vars='Concurrent')
17
17
 
18
+ sd = c(rack$sd, rails$sd)
19
+ df.long = cbind(df.long, sd)
20
+
18
21
  g = ggplot(df.long, aes(Concurrent, value, shape=variable)) +
19
22
  scale_x_log10(breaks=c(10, 50, 100, 500, 1000, 5000, 10000)) +
20
23
  scale_y_continuous(breaks=round(seq(1000, 15000, by=1000), 1)) +
@@ -23,6 +26,7 @@ g = ggplot(df.long, aes(Concurrent, value, shape=variable)) +
23
26
  xlab('Concurrent clients (log.)') +
24
27
  geom_line() +
25
28
  geom_point() +
29
+ geom_errorbar(aes(ymin=value-sd, ymax=value+sd)) +
26
30
  theme_bw()
27
31
 
28
32
  path = paste(args[1], 'frameworks', 'pdf', sep='.')
@@ -10,18 +10,19 @@ mri22_data = read.table(file=args[1], sep=',', header=T)
10
10
  mri23_data = read.table(file=args[2], sep=',', header=T)
11
11
  jruby17_data = read.table(file=args[3], sep=',', header=T)
12
12
  jruby9_data = read.table(file=args[4], sep=',', header=T)
13
- # rbx25_data = read.table(file=args[5], sep=',', header=T)
14
13
 
15
14
  x = mri22_data$concurrent
16
15
  mri22 = mri22_data$throughput
17
16
  mri23 = mri23_data$throughput
18
17
  jruby17 = jruby17_data$throughput
19
18
  jruby9 = jruby9_data$throughput
20
- # rbx25 = rbx25_data$throughput
21
19
 
22
- df = data.frame(x, mri22, mri23, jruby17, jruby9) #, rbx25)
20
+ df = data.frame(x, mri22, mri23, jruby17, jruby9)
23
21
  df.long = melt(df, id.vars='x')
24
22
 
23
+ sd = c(mri22_data$sd, mri23_data$sd, jruby17_data$sd, jruby9_data$sd)
24
+ df.long = cbind(df.long, sd)
25
+
25
26
  g = ggplot(df.long, aes(x, value, shape=variable)) +
26
27
  scale_x_log10(breaks=c(10, 50, 100, 500, 1000, 5000, 10000)) +
27
28
  scale_y_continuous(breaks=round(seq(1000, 15000, by=1000), 1)) +
@@ -30,6 +31,7 @@ g = ggplot(df.long, aes(x, value, shape=variable)) +
30
31
  xlab('Concurrent clients (log.)') +
31
32
  geom_line() +
32
33
  geom_point() +
34
+ geom_errorbar(aes(ymin=value-sd, ymax=value+sd)) +
33
35
  theme_bw()
34
36
 
35
37
  path = paste(args[1], 'vms', 'pdf', sep='.')
@@ -4,7 +4,7 @@ gem 'david', path: '../..'
4
4
  gem 'rack'
5
5
 
6
6
  # Rails
7
- gem 'rails', '~> 4.2.0'
7
+ gem 'rails', '~> 4.2.0', group: :rails
8
8
 
9
9
  # Grape
10
- gem 'grape'
10
+ gem 'grape', group: :grape
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- david (0.4.3.pre)
4
+ david (0.4.4.pre)
5
5
  celluloid-io (~> 0.16, >= 0.16.1)
6
6
  coap (>= 0.1)
7
7
  rack (~> 1.6)
@@ -5,18 +5,32 @@ def process_line(line)
5
5
  end
6
6
 
7
7
  def process_lines(lines)
8
- lines.map! { |line| process_line(line) }
9
- lines[0].zip(*lines[1..2]).map { |x| avg(*x.map(&:to_f)) }
8
+ lines.map { |line| process_line(line) }
9
+ end
10
+
11
+ def avg_lines(lines)
12
+ ls = process_lines(lines)
13
+ ls[0].zip(*ls[1..2]).map { |x| avg(*x.map(&:to_f)) }
10
14
  end
11
15
 
12
16
  def avg(*args)
13
17
  args.reduce(:+) / args.size.to_f
14
18
  end
15
19
 
20
+ def sd_lines(lines)
21
+ sd(*process_lines(lines).map { |a| a[4].to_f })
22
+ end
23
+
24
+ def sd(*args)
25
+ avg = avg(*args)
26
+ Math.sqrt(avg(*args.map { |x| (x - avg)**2 }))
27
+ end
28
+
16
29
  CSV.open(ARGV[0] + '.csv', 'wb') do |csv|
17
- csv << %w[concurrent loss throughput]
30
+ csv << %w[concurrent loss throughput sd]
18
31
  File.readlines(ARGV[0]).each_slice(3) do |lines|
19
- conc, _, total, loss, throughput = process_lines(lines)
20
- csv << [conc, (loss/total)*100, throughput].map { |x| x.round(5) }
32
+ conc, _, total, loss, throughput = avg_lines(lines)
33
+ sd = sd_lines(lines)
34
+ csv << [conc, (loss/total)*100, throughput, sd].map { |x| x.round(5) }
21
35
  end
22
36
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  Things."
12
12
 
13
13
  s.homepage = 'https://github.com/nning/david'
14
- s.license = 'GPL-3.0'
14
+ s.license = 'MIT'
15
15
  s.author = 'henning mueller'
16
16
  s.email = 'henning@orgizm.net'
17
17
 
@@ -1,7 +1,7 @@
1
1
  require 'benchmark/ips'
2
2
 
3
3
  Benchmark.ips do |x|
4
- a = [0..99999]
4
+ a = [*0..99999]
5
5
 
6
6
  x.report('map') do
7
7
  a.map { |e| e.to_s }
@@ -27,7 +27,7 @@ module David
27
27
  host, port = @options.values_at(:Host, :Port)
28
28
 
29
29
  log.info "David #{David::VERSION} on #{RUBY_DESCRIPTION}"
30
- log.info "Starting on [#{host}]:#{port}"
30
+ log.info "Starting on coap://[#{host}]:#{port}"
31
31
 
32
32
  af = ipv6? ? ::Socket::AF_INET6 : ::Socket::AF_INET
33
33
 
@@ -1,10 +1,12 @@
1
- class Trap
2
- def initialize(value)
3
- @value = value
4
- end
1
+ module David
2
+ class Trap
3
+ def initialize(value = nil)
4
+ @value = value
5
+ end
5
6
 
6
- def method_missing(method, *args)
7
- p method, caller[0]
8
- @value.send(method, *args)
7
+ def method_missing(method, *args)
8
+ p method, caller[0]
9
+ @value.send(method, *args) unless @value.nil?
10
+ end
9
11
  end
10
12
  end
@@ -1,7 +1,7 @@
1
1
  module David
2
2
  MAJOR = 0
3
3
  MINOR = 4
4
- PATCH = 3
4
+ PATCH = 4
5
5
  SUFFIX = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, PATCH, SUFFIX].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: david
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - henning mueller
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-15 00:00:00.000000000 Z
11
+ date: 2015-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: celluloid-io
@@ -244,7 +244,7 @@ files:
244
244
  - spec/utility_spec.rb
245
245
  homepage: https://github.com/nning/david
246
246
  licenses:
247
- - GPL-3.0
247
+ - MIT
248
248
  metadata: {}
249
249
  post_install_message:
250
250
  rdoc_options: []