hansel 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
data/hansel.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hansel}
8
- s.version = "0.2.7"
8
+ s.version = "0.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Paul Mylchreest"]
12
- s.date = %q{2010-06-13}
12
+ s.date = %q{2010-06-19}
13
13
  s.default_executable = %q{hansel}
14
14
  s.description = %q{Ruby driver for httperf - automated load and performance testing}
15
15
  s.email = %q{paul.mylchreest@mac.com}
@@ -18,7 +18,11 @@ module HanselCore
18
18
  file_name = output_filename{ "-#{num_conns.to_s}" }
19
19
  template = opts.template || File.join( [ File.dirname(__FILE__), '../../..', opts.template_path, 'octave.m.erb' ] )
20
20
  File.open(file_name, "w+") do |file|
21
- file.puts OctaveFormatter.new(res, { :output_file_name => file_name, :template => template }).format
21
+ file.puts OctaveFormatter.new(res,
22
+ { :output_file_name => file_name,
23
+ :template => template,
24
+ :png_file_name => "#{@server}:#{@port}-#{num_conns.to_s}.png"
25
+ }).format
22
26
  end
23
27
  end
24
28
 
@@ -36,8 +40,8 @@ module HanselCore
36
40
  def output_filename
37
41
  opts, part = options, (block_given? ? yield : '')
38
42
  type = { :yaml => 'yml', :csv => 'csv', :octave => 'm' }[opts.format.to_sym]
39
- server, port = (res = results.first) && res.server, res.port
40
- [File.join([opts.output_dir, ("#{server}:#{port}" + part)]), type].join('.')
43
+ @server, @port = (res = results.first) && res.server, res.port
44
+ [File.join([opts.output_dir, ("#{@server}:#{@port}" + part)]), type].join('.')
41
45
  end
42
46
  end
43
47
  end
@@ -8,15 +8,15 @@ module HanselCore
8
8
  def initialize(data, options = {})
9
9
  @data = data
10
10
  @template = options[:template]
11
- @rates = @data.map(&:rate)
11
+ @rates = @data.map &:rate
12
12
  @max_rate = @rates.max
13
- @png_output = [(options[:output_file_name] || 'stats'), 'png'].join('.')
13
+ @png_output = options[:png_file_name]
14
14
  end
15
15
 
16
16
  # For each value of rate, collate the values in each variable in @vars
17
17
  # and format using the erb template
18
18
  def format
19
- ERB.new(File.read(@template)).result(binding)
19
+ ERB.new(File.read(@template)).result binding
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 7
9
- version: 0.2.7
8
+ - 8
9
+ version: 0.2.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Mylchreest
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-13 00:00:00 -04:00
17
+ date: 2010-06-19 00:00:00 -04:00
18
18
  default_executable: hansel
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency