performance_tester 0.0.9 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -32,9 +32,8 @@ module PerformanceTester
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
require 'performance_tester/
|
35
|
+
require 'performance_tester/summary_logger'
|
36
36
|
require 'performance_tester/csv_logger'
|
37
37
|
|
38
|
-
PerformanceTester.register_logger(
|
39
|
-
:summary, PerformanceTester::PutsAggregateLogger)
|
38
|
+
PerformanceTester.register_logger(:summary, PerformanceTester::SummaryLogger)
|
40
39
|
PerformanceTester.register_logger(:csv, PerformanceTester::CsvLogger)
|
@@ -35,6 +35,7 @@ module PerformanceTester
|
|
35
35
|
end
|
36
36
|
driver_options = {
|
37
37
|
:debug => false,
|
38
|
+
:timeout => timeout,
|
38
39
|
:phantomjs_options => phantomjs_options
|
39
40
|
}
|
40
41
|
driver.new(app, driver_options)
|
@@ -80,6 +81,10 @@ module PerformanceTester
|
|
80
81
|
options.fetch(:load_images) { true }
|
81
82
|
end
|
82
83
|
|
84
|
+
def timeout
|
85
|
+
options.fetch(:timeout) { 30 }
|
86
|
+
end
|
87
|
+
|
83
88
|
def outcome
|
84
89
|
options.fetch(:outcome) { Outcome }
|
85
90
|
end
|
@@ -2,13 +2,17 @@
|
|
2
2
|
|
3
3
|
module PerformanceTester
|
4
4
|
# Prints summary data to stdout
|
5
|
-
class
|
5
|
+
class SummaryLogger < Logger
|
6
6
|
def log
|
7
7
|
puts "Test run: #{run_name}"
|
8
8
|
puts "Success: #{outcome.success?}"
|
9
9
|
puts "Number of requests: #{number_of_requests}"
|
10
10
|
puts "Sum of request times: #{d(sum_of_times_of_all_requests)}"
|
11
11
|
puts "Total time elapsed: #{d(total_time_elapsed)}"
|
12
|
+
unless outcome.success?
|
13
|
+
puts "Error: #{error.message}"
|
14
|
+
puts error.backtrace.join("\n")
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
def d(value)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: performance_tester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,9 +43,9 @@ files:
|
|
43
43
|
- lib/performance_tester/csv_logger.rb
|
44
44
|
- lib/performance_tester/logger.rb
|
45
45
|
- lib/performance_tester/outcome.rb
|
46
|
-
- lib/performance_tester/puts_aggregate_logger.rb
|
47
46
|
- lib/performance_tester/runner.rb
|
48
47
|
- lib/performance_tester/scenario.rb
|
48
|
+
- lib/performance_tester/summary_logger.rb
|
49
49
|
- lib/performance_tester/version.rb
|
50
50
|
- performance_tester.gemspec
|
51
51
|
homepage: ''
|