skaes-railsbench 0.9.3 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -123,6 +123,10 @@ def quote_arguments(argv)
123
123
  argv.map{|a| a.include?(' ') ? "'#{a}'" : a.to_s}.join(' ')
124
124
  end
125
125
 
126
+ def ruby
127
+ ENV['RUBY'] || "ruby"
128
+ end
129
+
126
130
  def perf_run(script, iterations, options, raw_data_file)
127
131
  perf_runs = (ENV['RAILS_PERF_RUNS'] ||= "3").to_i
128
132
 
@@ -132,8 +136,8 @@ def perf_run(script, iterations, options, raw_data_file)
132
136
  perf_options = "#{iterations} #{options}"
133
137
  null = (RUBY_PLATFORM =~ /win32/i) ? 'nul' : '/dev/null'
134
138
 
135
- perf_cmd = "ruby #{RAILSBENCH_BINDIR}/perf_bench #{perf_options}"
136
- print_cmd = "ruby #{RAILSBENCH_BINDIR}/perf_times #{raw_data_file}"
139
+ perf_cmd = "#{ruby} #{RAILSBENCH_BINDIR}/perf_bench #{perf_options}"
140
+ print_cmd = "#{ruby} #{RAILSBENCH_BINDIR}/perf_times #{raw_data_file}"
137
141
 
138
142
  puts "benchmarking #{perf_runs} runs with options #{perf_options}"
139
143
 
@@ -157,8 +161,8 @@ def perf_run_gc(script, iterations, options, raw_data_file)
157
161
  perf_options = "#{iterations} #{warmup} #{options}"
158
162
  null = (RUBY_PLATFORM =~ /win32/) ? 'nul' : '/dev/null'
159
163
 
160
- perf_cmd = "ruby #{RAILSBENCH_BINDIR}/run_urls #{perf_options} >#{null}"
161
- print_cmd = "ruby #{RAILSBENCH_BINDIR}/perf_times_gc #{raw_data_file}"
164
+ perf_cmd = "#{ruby} #{RAILSBENCH_BINDIR}/run_urls #{perf_options} >#{null}"
165
+ print_cmd = "#{ruby} #{RAILSBENCH_BINDIR}/perf_times_gc #{raw_data_file}"
162
166
 
163
167
  if options =~ /-leaks/
164
168
  if RUBY_PLATFORM =~ /darwin9/
@@ -1,9 +1,9 @@
1
- module Railsbench #:nodoc:
2
- module VERSION #:nodoc:
3
- MAJOR = 0
4
- MINOR = 9
5
- TINY = 3
6
-
7
- STRING = [MAJOR, MINOR, TINY].join('.')
8
- end
9
- end
1
+ module Railsbench #:nodoc:
2
+ module VERSION #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 9
5
+ TINY = 4
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: skaes-railsbench
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-13 00:00:00 -08:00
12
+ date: 2009-03-17 00:00:00 -07:00
13
13
  default_executable: railsbench
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hoe
17
+ type: :development
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements: