Skip to content

Commit 358ad37

Browse files
committedJan 6, 2009
Added tour name to logging report
1 parent 1838e7c commit 358ad37

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed
 

‎lib/tour_bus.rb

+7-1
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ def runners(filter=[])
3636
Dir[File.join('.', 'tours', '**', '*.rb')].map {|fn| File.basename(fn, ".rb")}.select {|fn| filter.size.zero? || filter.any?{|f| fn =~ /#{f}/}}
3737
end
3838

39+
def total_runs
40+
tours.size * concurrency * number
41+
end
42+
3943
def run
4044
threads = []
45+
tour_name = "#{total_runs} runs: #{concurrency}x#{number} of #{tours * ','}"
4146
started = Time.now.to_f
4247
concurrency.times do |conc|
43-
log "Starting #{concurrency} runners to run #{tours.size} tours #{number} times (for a total of #{tours.size*concurrency*number} times)"
48+
log "Starting #{tour_name}"
4449
threads << Thread.new do
4550
runner_id = next_runner_id
4651
runs,passes,fails,errors,start = 0,0,0,0,Time.now.to_f
@@ -59,6 +64,7 @@ def run
5964
threads.each {|t| t.join }
6065
finished = Time.now.to_f
6166
log '-' * 80
67+
log tour_name
6268
log "All Runners finished."
6369
log "Total Runs: #{@runs}"
6470
log "Total Passes: #{@passes}"

‎pkg/tourbus-0.0.3.gem

16 KB
Binary file not shown.

‎tourbus.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
spec = Gem::Specification.new do |s|
22
s.name = 'tourbus'
3-
s.version = '0.0.2'
3+
s.version = '0.0.3'
44
s.date = '2009-01-05'
55
s.summary = 'TourBus web stress-testing tool'
66
s.email = "github@shinybit.com"

0 commit comments

Comments
 (0)
Please sign in to comment.