Skip to content

Commit

Permalink
0.2.18 release
Browse files Browse the repository at this point in the history
  - add the work job description to httperf results hash;
  - minor improvements.
  • Loading branch information
xlymian committed Jul 5, 2011
1 parent 7f43fd3 commit c0809e7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
hansel (0.2.16)
hansel (0.2.18)

GEM
remote: http://rubygems.org/
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -8,7 +8,6 @@ rescue LoadError
end

$LOAD_PATH.unshift 'lib'
load 'tasks/octave.rake'

RSpec::Core::RakeTask.new do |t|
t.rspec_opts = [ "--color" ]
Expand Down
3 changes: 3 additions & 0 deletions lib/hansel/formatting/formatting.rb
Expand Up @@ -3,6 +3,9 @@ module Formatting
def yaml_formatter
File.open(output_filename, "w+") do |file|
file.puts YamlFormatter.format results
# file.puts YamlFormatter.format results.merge({
# :description => @current_job.description
# })
end
end

Expand Down
11 changes: 6 additions & 5 deletions lib/hansel/httperf/httperf.rb
Expand Up @@ -27,11 +27,12 @@ def httperf warm_up = false
IO.popen("#{httperf_cmd} 2>&1") do |pipe|
status "\n#{httperf_cmd}"
@results << (httperf_result = HttperfResult.new({
:rate => @current_rate,
:server => @current_job.server,
:port => @current_job.port,
:uri => @current_job.uri,
:num_conns => @current_job.num_conns
:rate => @current_rate,
:server => @current_job.server,
:port => @current_job.port,
:uri => @current_job.uri,
:num_conns => @current_job.num_conns,
:description => @current_job.description
}))
HttperfResultParser.new(pipe).parse(httperf_result)
end
Expand Down
13 changes: 7 additions & 6 deletions lib/hansel/httperf_result.rb
Expand Up @@ -6,14 +6,15 @@ class HttperfResult
attr_accessor :rate, :server, :port, :uri, :num_conns, :replies,
:connection_rate, :request_rate, :reply_time, :net_io,
:errors, :status, :reply_rate_min, :reply_rate_avg,
:reply_rate_max, :reply_rate_stddev
:reply_rate_max, :reply_rate_stddev, :description

def initialize opt
@rate = opt[:rate]
@server = opt[:server]
@port = opt[:port]
@uri = opt[:uri]
@num_conns = opt[:num_conns]
@rate = opt[:rate]
@server = opt[:server]
@port = opt[:port]
@uri = opt[:uri]
@num_conns = opt[:num_conns]
@description = opt[:description]
end

def post_deserialize
Expand Down
8 changes: 4 additions & 4 deletions lib/tasks/octave.rake → lib/hansel/tasks.rake
Expand Up @@ -28,10 +28,10 @@ namespace :hansel do
end
end

# rake hansel:octave:run[input_dir]
desc "Run octave on all *.m files in the specified directory"
task :run, :input_dir do |t, args|
%x[ cd #{args.input_dir} && octave *.m ]
# rake hansel:octave:run[input_dir,input_file]
desc "Run octave on the specified file"
task :run, :input_dir, :input_file do |t, args|
%x[ cd #{args.input_dir} && octave #{args.input_file} ]
end
end
end
2 changes: 1 addition & 1 deletion lib/hansel/version.rb
@@ -1,3 +1,3 @@
module HanselCore
Version = VERSION = '0.2.17'
Version = VERSION = '0.2.18' unless defined? HanselCore::VERSION
end

0 comments on commit c0809e7

Please sign in to comment.