test-prof 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +59 -1
- data/README.md +12 -2
- data/guides/event_prof.md +12 -0
- data/guides/factory_doctor.md +10 -0
- data/guides/let_it_be.md +96 -0
- data/guides/rspec_dissect.md +58 -0
- data/guides/ruby_prof.md +5 -5
- data/guides/stack_prof.md +3 -3
- data/lib/test_prof/cops/rspec/aggregate_failures.rb +2 -2
- data/lib/test_prof/event_prof/custom_events/factory_create.rb +5 -1
- data/lib/test_prof/event_prof/custom_events/sidekiq_inline.rb +5 -1
- data/lib/test_prof/event_prof/custom_events/sidekiq_jobs.rb +5 -1
- data/lib/test_prof/event_prof/rspec.rb +44 -5
- data/lib/test_prof/event_prof.rb +38 -25
- data/lib/test_prof/ext/array_bsearch_index.rb +15 -0
- data/lib/test_prof/ext/float_duration.rb +0 -1
- data/lib/test_prof/ext/string_strip_heredoc.rb +15 -0
- data/lib/test_prof/ext/string_truncate.rb +19 -0
- data/lib/test_prof/factory_doctor/rspec.rb +38 -2
- data/lib/test_prof/factory_doctor.rb +12 -4
- data/lib/test_prof/factory_prof/printers/simple.rb +4 -1
- data/lib/test_prof/recipes/rspec/any_fixture.rb +1 -1
- data/lib/test_prof/recipes/rspec/before_all.rb +8 -0
- data/lib/test_prof/recipes/rspec/let_it_be.rb +80 -0
- data/lib/test_prof/rspec_dissect/rspec.rb +157 -0
- data/lib/test_prof/rspec_dissect.rb +112 -0
- data/lib/test_prof/rspec_stamp/parser.rb +58 -7
- data/lib/test_prof/rspec_stamp/rspec.rb +10 -34
- data/lib/test_prof/rspec_stamp.rb +55 -6
- data/lib/test_prof/ruby_prof.rb +19 -4
- data/lib/test_prof/stack_prof.rb +19 -5
- data/lib/test_prof/tag_prof/rspec.rb +5 -3
- data/lib/test_prof/utils/sized_ordered_set.rb +65 -0
- data/lib/test_prof/utils.rb +18 -0
- data/lib/test_prof/version.rb +1 -1
- data/lib/test_prof.rb +15 -2
- metadata +15 -75
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "test_prof/ext/string_strip_heredoc"
|
|
4
|
+
|
|
3
5
|
module TestProf
|
|
4
6
|
module RSpecStamp
|
|
5
7
|
class RSpecListener # :nodoc:
|
|
6
8
|
include Logging
|
|
9
|
+
using StringStripHeredoc
|
|
7
10
|
|
|
8
11
|
NOTIFICATIONS = %i[
|
|
9
12
|
example_failed
|
|
@@ -27,54 +30,27 @@ module TestProf
|
|
|
27
30
|
end
|
|
28
31
|
|
|
29
32
|
def stamp!
|
|
33
|
+
stamper = Stamper.new
|
|
34
|
+
|
|
30
35
|
@examples.each do |file, lines|
|
|
31
|
-
stamp_file(file, lines.uniq)
|
|
36
|
+
stamper.stamp_file(file, lines.uniq)
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
msgs = []
|
|
35
40
|
|
|
36
41
|
msgs <<
|
|
37
|
-
|
|
42
|
+
<<-MSG.strip_heredoc
|
|
38
43
|
RSpec Stamp results
|
|
39
44
|
|
|
40
|
-
Total patches: #{
|
|
45
|
+
Total patches: #{stamper.total}
|
|
41
46
|
Total files: #{@examples.keys.size}
|
|
42
47
|
|
|
43
|
-
Failed patches: #{
|
|
44
|
-
Ignored files: #{
|
|
48
|
+
Failed patches: #{stamper.failed}
|
|
49
|
+
Ignored files: #{stamper.ignored}
|
|
45
50
|
MSG
|
|
46
51
|
|
|
47
52
|
log :info, msgs.join
|
|
48
53
|
end
|
|
49
|
-
|
|
50
|
-
private
|
|
51
|
-
|
|
52
|
-
def stamp_file(file, lines)
|
|
53
|
-
@total += lines.size
|
|
54
|
-
return if ignored?(file)
|
|
55
|
-
|
|
56
|
-
log :info, "(dry-run) Patching #{file}" if dry_run?
|
|
57
|
-
|
|
58
|
-
code = File.readlines(file)
|
|
59
|
-
|
|
60
|
-
@failed += RSpecStamp.apply_tags(code, lines, RSpecStamp.config.tags)
|
|
61
|
-
|
|
62
|
-
File.write(file, code.join) unless dry_run?
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def ignored?(file)
|
|
66
|
-
ignored = RSpecStamp.config.ignore_files.find do |pattern|
|
|
67
|
-
file =~ pattern
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
return unless ignored
|
|
71
|
-
log :warn, "Ignore stamping file: #{file}"
|
|
72
|
-
@ignored += 1
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def dry_run?
|
|
76
|
-
RSpecStamp.config.dry_run?
|
|
77
|
-
end
|
|
78
54
|
end
|
|
79
55
|
end
|
|
80
56
|
end
|
|
@@ -10,7 +10,8 @@ module TestProf
|
|
|
10
10
|
|
|
11
11
|
# RSpecStamp configuration
|
|
12
12
|
class Configuration
|
|
13
|
-
|
|
13
|
+
attr_reader :tags
|
|
14
|
+
attr_accessor :ignore_files, :dry_run
|
|
14
15
|
|
|
15
16
|
def initialize
|
|
16
17
|
@ignore_files = [%r{spec/support}]
|
|
@@ -44,6 +45,49 @@ module TestProf
|
|
|
44
45
|
end
|
|
45
46
|
end
|
|
46
47
|
|
|
48
|
+
# Stamper collects statistics about applying tags
|
|
49
|
+
# to examples.
|
|
50
|
+
class Stamper
|
|
51
|
+
include TestProf::Logging
|
|
52
|
+
|
|
53
|
+
attr_reader :total, :failed, :ignored
|
|
54
|
+
|
|
55
|
+
def initialize
|
|
56
|
+
@total = 0
|
|
57
|
+
@failed = 0
|
|
58
|
+
@ignored = 0
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def stamp_file(file, lines)
|
|
62
|
+
@total += lines.size
|
|
63
|
+
return if ignored?(file)
|
|
64
|
+
|
|
65
|
+
log :info, "(dry-run) Patching #{file}" if dry_run?
|
|
66
|
+
|
|
67
|
+
code = File.readlines(file)
|
|
68
|
+
|
|
69
|
+
@failed += RSpecStamp.apply_tags(code, lines, RSpecStamp.config.tags)
|
|
70
|
+
|
|
71
|
+
File.write(file, code.join) unless dry_run?
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
private
|
|
75
|
+
|
|
76
|
+
def ignored?(file)
|
|
77
|
+
ignored = RSpecStamp.config.ignore_files.find do |pattern|
|
|
78
|
+
file =~ pattern
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
return unless ignored
|
|
82
|
+
log :warn, "Ignore stamping file: #{file}"
|
|
83
|
+
@ignored += 1
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def dry_run?
|
|
87
|
+
RSpecStamp.config.dry_run?
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
47
91
|
class << self
|
|
48
92
|
include TestProf::Logging
|
|
49
93
|
|
|
@@ -84,12 +128,16 @@ module TestProf
|
|
|
84
128
|
parsed = Parser.parse(code)
|
|
85
129
|
return false unless parsed
|
|
86
130
|
|
|
87
|
-
parsed.desc
|
|
131
|
+
desc = parsed.desc_const || quote(parsed.desc || 'works')
|
|
88
132
|
|
|
89
133
|
tags.each do |t|
|
|
90
134
|
if t.is_a?(Hash)
|
|
91
|
-
t.
|
|
135
|
+
t.each_key do |k|
|
|
136
|
+
parsed.remove_tag(k)
|
|
137
|
+
parsed.add_htag(k, t[k])
|
|
138
|
+
end
|
|
92
139
|
else
|
|
140
|
+
parsed.remove_tag(t)
|
|
93
141
|
parsed.add_tag(t)
|
|
94
142
|
end
|
|
95
143
|
end
|
|
@@ -97,9 +145,9 @@ module TestProf
|
|
|
97
145
|
need_parens = block == "{"
|
|
98
146
|
|
|
99
147
|
tags_str = parsed.tags.map { |t| t.is_a?(Symbol) ? ":#{t}" : t }.join(", ") unless
|
|
100
|
-
parsed.tags.nil?
|
|
148
|
+
parsed.tags.nil? || parsed.tags.empty?
|
|
101
149
|
|
|
102
|
-
unless parsed.htags.nil?
|
|
150
|
+
unless parsed.htags.nil? || parsed.htags.empty?
|
|
103
151
|
htags_str = parsed.htags.map do |(k, v)|
|
|
104
152
|
vstr = v.is_a?(Symbol) ? ":#{v}" : quote(v)
|
|
105
153
|
|
|
@@ -108,7 +156,7 @@ module TestProf
|
|
|
108
156
|
end
|
|
109
157
|
|
|
110
158
|
replacement = "\\1#{parsed.fname}#{need_parens ? '(' : ' '}"\
|
|
111
|
-
"#{[
|
|
159
|
+
"#{[desc, tags_str, htags_str].compact.join(', ')}"\
|
|
112
160
|
"#{need_parens ? ') ' : ' '}\\3"
|
|
113
161
|
|
|
114
162
|
if config.dry_run?
|
|
@@ -122,6 +170,7 @@ module TestProf
|
|
|
122
170
|
# rubocop: enable Metrics/PerceivedComplexity
|
|
123
171
|
|
|
124
172
|
def quote(str)
|
|
173
|
+
return str unless str.is_a?(String)
|
|
125
174
|
if str.include?("'")
|
|
126
175
|
"\"#{str}\""
|
|
127
176
|
else
|
data/lib/test_prof/ruby_prof.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "test_prof/ext/string_strip_heredoc"
|
|
4
|
+
|
|
3
5
|
module TestProf
|
|
4
6
|
# RubyProf wrapper.
|
|
5
7
|
#
|
|
@@ -48,7 +50,8 @@ module TestProf
|
|
|
48
50
|
:include_threads, :eliminate_methods
|
|
49
51
|
|
|
50
52
|
def initialize
|
|
51
|
-
@printer = ENV.
|
|
53
|
+
@printer = ENV['TEST_RUBY_PROF'].to_sym if PRINTERS.key?(ENV['TEST_RUBY_PROF'])
|
|
54
|
+
@printer ||= ENV.fetch('TEST_RUBY_PROF_PRINTER', :flat).to_sym
|
|
52
55
|
@mode = ENV.fetch('TEST_RUBY_PROF_MODE', :wall).to_sym
|
|
53
56
|
@min_percent = 1
|
|
54
57
|
@include_threads = false
|
|
@@ -119,6 +122,7 @@ module TestProf
|
|
|
119
122
|
|
|
120
123
|
class << self
|
|
121
124
|
include Logging
|
|
125
|
+
using StringStripHeredoc
|
|
122
126
|
|
|
123
127
|
def config
|
|
124
128
|
@config ||= Configuration.new
|
|
@@ -172,12 +176,23 @@ module TestProf
|
|
|
172
176
|
ENV["RUBY_PROF_MEASURE_MODE"] = config.mode.to_s
|
|
173
177
|
@initialized = TestProf.require(
|
|
174
178
|
'ruby-prof',
|
|
175
|
-
|
|
179
|
+
<<-MSG.strip_heredoc
|
|
176
180
|
Please, install 'ruby-prof' first:
|
|
177
181
|
# Gemfile
|
|
178
|
-
gem 'ruby-prof', require: false
|
|
182
|
+
gem 'ruby-prof', '>= 0.16.0', require: false
|
|
179
183
|
MSG
|
|
180
|
-
)
|
|
184
|
+
) { check_ruby_prof_version }
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
def check_ruby_prof_version
|
|
188
|
+
if Utils.verify_gem_version('ruby-prof', at_least: '0.16.0')
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
log :error, <<-MGS.strip_heredoc
|
|
192
|
+
Please, upgrade 'ruby-prof' to version >= 0.16.0.
|
|
193
|
+
MGS
|
|
194
|
+
false
|
|
195
|
+
end
|
|
181
196
|
end
|
|
182
197
|
end
|
|
183
198
|
end
|
data/lib/test_prof/stack_prof.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "test_prof/ext/string_strip_heredoc"
|
|
4
|
+
|
|
3
5
|
module TestProf
|
|
4
6
|
# StackProf wrapper.
|
|
5
7
|
#
|
|
@@ -26,12 +28,13 @@ module TestProf
|
|
|
26
28
|
|
|
27
29
|
def initialize
|
|
28
30
|
@mode = ENV.fetch('TEST_STACK_PROF_MODE', :wall).to_sym
|
|
29
|
-
@raw = ENV['TEST_STACK_PROF_RAW'] ==
|
|
31
|
+
@raw = ENV['TEST_STACK_PROF'] == 'raw' || ENV['TEST_STACK_PROF_RAW'] == 1
|
|
30
32
|
end
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
class << self
|
|
34
36
|
include Logging
|
|
37
|
+
using StringStripHeredoc
|
|
35
38
|
|
|
36
39
|
def config
|
|
37
40
|
@config ||= Configuration.new
|
|
@@ -88,7 +91,7 @@ module TestProf
|
|
|
88
91
|
|
|
89
92
|
html_path = path.gsub(/\.dump$/, '.html')
|
|
90
93
|
|
|
91
|
-
log :info,
|
|
94
|
+
log :info, <<-MSG.strip_heredoc
|
|
92
95
|
Run the following command to generate a flame graph report:
|
|
93
96
|
|
|
94
97
|
stackprof --flamegraph #{path} > #{html_path} && stackprof --flamegraph-viewer=#{html_path}
|
|
@@ -111,12 +114,23 @@ module TestProf
|
|
|
111
114
|
return @initialized if instance_variable_defined?(:@initialized)
|
|
112
115
|
@initialized = TestProf.require(
|
|
113
116
|
'stackprof',
|
|
114
|
-
|
|
117
|
+
<<-MSG.strip_heredoc
|
|
115
118
|
Please, install 'stackprof' first:
|
|
116
119
|
# Gemfile
|
|
117
|
-
gem 'stackprof', require: false
|
|
120
|
+
gem 'stackprof', '>= 0.2.9', require: false
|
|
118
121
|
MSG
|
|
119
|
-
)
|
|
122
|
+
) { check_stack_prof_version }
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def check_stack_prof_version
|
|
126
|
+
if Utils.verify_gem_version('stackprof', at_least: '0.2.9')
|
|
127
|
+
true
|
|
128
|
+
else
|
|
129
|
+
log :error, <<-MSG.strip_heredoc
|
|
130
|
+
Please, upgrade 'stackprof' to version >= 0.2.9.
|
|
131
|
+
MSG
|
|
132
|
+
false
|
|
133
|
+
end
|
|
120
134
|
end
|
|
121
135
|
end
|
|
122
136
|
end
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "test_prof/ext/float_duration"
|
|
4
|
+
require "test_prof/ext/string_strip_heredoc"
|
|
4
5
|
|
|
5
6
|
module TestProf
|
|
6
7
|
module TagProf
|
|
7
8
|
class RSpecListener # :nodoc:
|
|
8
9
|
include Logging
|
|
9
10
|
using FloatDuration
|
|
11
|
+
using StringStripHeredoc
|
|
10
12
|
|
|
11
13
|
NOTIFICATIONS = %i[
|
|
12
14
|
example_started
|
|
@@ -21,7 +23,7 @@ module TestProf
|
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
def example_started(_notification)
|
|
24
|
-
@ts =
|
|
26
|
+
@ts = TestProf.now
|
|
25
27
|
end
|
|
26
28
|
|
|
27
29
|
def example_finished(notification)
|
|
@@ -30,14 +32,14 @@ module TestProf
|
|
|
30
32
|
tag = notification.example.metadata.fetch(@tag, :__unknown__)
|
|
31
33
|
|
|
32
34
|
@tags[tag][:count] += 1
|
|
33
|
-
@tags[tag][:time] += (
|
|
35
|
+
@tags[tag][:time] += (TestProf.now - @ts)
|
|
34
36
|
end
|
|
35
37
|
|
|
36
38
|
def print
|
|
37
39
|
msgs = []
|
|
38
40
|
|
|
39
41
|
msgs <<
|
|
40
|
-
|
|
42
|
+
<<-MSG.strip_heredoc
|
|
41
43
|
TagProf report for #{@tag}
|
|
42
44
|
MSG
|
|
43
45
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TestProf
|
|
4
|
+
module Utils
|
|
5
|
+
# Ordered set with capacity
|
|
6
|
+
class SizedOrderedSet
|
|
7
|
+
unless [].respond_to?(:bsearch_index)
|
|
8
|
+
require "test_prof/ext/array_bsearch_index"
|
|
9
|
+
using ArrayBSearchIndex
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
include Enumerable
|
|
13
|
+
|
|
14
|
+
def initialize(max_size, sort_by: nil)
|
|
15
|
+
@max_size = max_size
|
|
16
|
+
@comparator =
|
|
17
|
+
if block_given?
|
|
18
|
+
Proc.new
|
|
19
|
+
elsif !sort_by.nil?
|
|
20
|
+
->(x, y) { x[sort_by] >= y[sort_by] }
|
|
21
|
+
else
|
|
22
|
+
->(x, y) { x >= y }
|
|
23
|
+
end
|
|
24
|
+
@data = []
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def <<(item)
|
|
28
|
+
return if data.size == max_size &&
|
|
29
|
+
comparator.call(data.last, item)
|
|
30
|
+
|
|
31
|
+
# Find an index of a smaller element
|
|
32
|
+
index = data.bsearch_index { |x| !comparator.call(x, item) }
|
|
33
|
+
|
|
34
|
+
if index.nil?
|
|
35
|
+
data << item
|
|
36
|
+
else
|
|
37
|
+
data.insert(index, item)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
data.pop if data.size > max_size
|
|
41
|
+
data.size
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def each
|
|
45
|
+
if block_given?
|
|
46
|
+
data.each(&Proc.new)
|
|
47
|
+
else
|
|
48
|
+
data.each
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def size
|
|
53
|
+
data.size
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def to_a
|
|
57
|
+
data.dup
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
attr_reader :max_size, :data, :comparator
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TestProf
|
|
4
|
+
module Utils # :nodoc:
|
|
5
|
+
class << self
|
|
6
|
+
# Verify that loaded gem has correct version
|
|
7
|
+
def verify_gem_version(gem_name, at_least: nil, at_most: nil)
|
|
8
|
+
raise ArgumentError, "Please, provide `at_least` or `at_most` argument" if
|
|
9
|
+
at_least.nil? && at_most.nil?
|
|
10
|
+
|
|
11
|
+
version = Gem.loaded_specs[gem_name].version
|
|
12
|
+
|
|
13
|
+
(at_least.nil? || Gem::Version.new(at_least) <= version) &&
|
|
14
|
+
(at_most.nil? || Gem::Version.new(at_most) >= version)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/lib/test_prof/version.rb
CHANGED
data/lib/test_prof.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require "fileutils"
|
|
4
4
|
require "test_prof/version"
|
|
5
5
|
require "test_prof/logging"
|
|
6
|
+
require "test_prof/utils"
|
|
6
7
|
|
|
7
8
|
# Ruby applications tests profiling tools.
|
|
8
9
|
#
|
|
@@ -33,11 +34,22 @@ module TestProf
|
|
|
33
34
|
yield config
|
|
34
35
|
end
|
|
35
36
|
|
|
37
|
+
# Avoid issues with wrong time due to monkey-patches (e.g. timecop)
|
|
38
|
+
# See https://github.com/rspec/rspec-core/blob/v3.6.0/lib/rspec/core.rb#L147
|
|
39
|
+
#
|
|
40
|
+
# We also want to handle Timecop specificaly
|
|
41
|
+
# See https://github.com/travisjeffery/timecop/blob/master/lib/timecop/time_extensions.rb#L11
|
|
42
|
+
if Time.respond_to?(:now_without_mock_time)
|
|
43
|
+
define_method(:now, &::Time.method(:now_without_mock_time))
|
|
44
|
+
else
|
|
45
|
+
define_method(:now, &::Time.method(:now))
|
|
46
|
+
end
|
|
47
|
+
|
|
36
48
|
# Require gem and shows a custom
|
|
37
49
|
# message if it fails to load
|
|
38
50
|
def require(gem_name, msg)
|
|
39
51
|
Kernel.require gem_name
|
|
40
|
-
true
|
|
52
|
+
block_given? ? yield : true
|
|
41
53
|
rescue LoadError
|
|
42
54
|
log :error, msg
|
|
43
55
|
false
|
|
@@ -79,7 +91,7 @@ module TestProf
|
|
|
79
91
|
|
|
80
92
|
def with_timestamps(path)
|
|
81
93
|
return path unless config.timestamps?
|
|
82
|
-
timestamps = "-#{
|
|
94
|
+
timestamps = "-#{now.to_i}"
|
|
83
95
|
"#{path.sub(/\.\w+$/, '')}#{timestamps}#{::File.extname(path)}"
|
|
84
96
|
end
|
|
85
97
|
end
|
|
@@ -115,3 +127,4 @@ require "test_prof/factory_doctor"
|
|
|
115
127
|
require "test_prof/factory_prof"
|
|
116
128
|
require "test_prof/rspec_stamp"
|
|
117
129
|
require "test_prof/tag_prof"
|
|
130
|
+
require "test_prof/rspec_dissect"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: test-prof
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vladimir Dementyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-09-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -66,90 +66,20 @@ dependencies:
|
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '5.9'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: activerecord
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - "~>"
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '5.0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - "~>"
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '5.0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: factory_girl
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - "~>"
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: 4.8.0
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - "~>"
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: 4.8.0
|
|
97
69
|
- !ruby/object:Gem::Dependency
|
|
98
70
|
name: rubocop
|
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
|
100
72
|
requirements:
|
|
101
73
|
- - "~>"
|
|
102
74
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '0.
|
|
104
|
-
type: :development
|
|
105
|
-
prerelease: false
|
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
-
requirements:
|
|
108
|
-
- - "~>"
|
|
109
|
-
- !ruby/object:Gem::Version
|
|
110
|
-
version: '0.49'
|
|
111
|
-
- !ruby/object:Gem::Dependency
|
|
112
|
-
name: pry-byebug
|
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
|
114
|
-
requirements:
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: '0'
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - ">="
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0'
|
|
125
|
-
- !ruby/object:Gem::Dependency
|
|
126
|
-
name: sqlite3
|
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
|
128
|
-
requirements:
|
|
129
|
-
- - ">="
|
|
130
|
-
- !ruby/object:Gem::Version
|
|
131
|
-
version: '0'
|
|
132
|
-
type: :development
|
|
133
|
-
prerelease: false
|
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
-
requirements:
|
|
136
|
-
- - ">="
|
|
137
|
-
- !ruby/object:Gem::Version
|
|
138
|
-
version: '0'
|
|
139
|
-
- !ruby/object:Gem::Dependency
|
|
140
|
-
name: sidekiq
|
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
|
142
|
-
requirements:
|
|
143
|
-
- - "~>"
|
|
144
|
-
- !ruby/object:Gem::Version
|
|
145
|
-
version: '4.0'
|
|
75
|
+
version: '0.50'
|
|
146
76
|
type: :development
|
|
147
77
|
prerelease: false
|
|
148
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
79
|
requirements:
|
|
150
80
|
- - "~>"
|
|
151
81
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
82
|
+
version: '0.50'
|
|
153
83
|
description: "\n Ruby applications tests profiling tools.\n\n Contains tools
|
|
154
84
|
to anylyze factories usage, integrate with Ruby profilers,\n profile your examples
|
|
155
85
|
using ActiveSupport notifications (if any) and\n statically analyze your code
|
|
@@ -178,6 +108,8 @@ files:
|
|
|
178
108
|
- guides/factory_default.md
|
|
179
109
|
- guides/factory_doctor.md
|
|
180
110
|
- guides/factory_prof.md
|
|
111
|
+
- guides/let_it_be.md
|
|
112
|
+
- guides/rspec_dissect.md
|
|
181
113
|
- guides/rspec_stamp.md
|
|
182
114
|
- guides/rubocop.md
|
|
183
115
|
- guides/ruby_prof.md
|
|
@@ -196,7 +128,10 @@ files:
|
|
|
196
128
|
- lib/test_prof/event_prof/instrumentations/active_support.rb
|
|
197
129
|
- lib/test_prof/event_prof/minitest.rb
|
|
198
130
|
- lib/test_prof/event_prof/rspec.rb
|
|
131
|
+
- lib/test_prof/ext/array_bsearch_index.rb
|
|
199
132
|
- lib/test_prof/ext/float_duration.rb
|
|
133
|
+
- lib/test_prof/ext/string_strip_heredoc.rb
|
|
134
|
+
- lib/test_prof/ext/string_truncate.rb
|
|
200
135
|
- lib/test_prof/factory_default.rb
|
|
201
136
|
- lib/test_prof/factory_default/factory_girl_patch.rb
|
|
202
137
|
- lib/test_prof/factory_doctor.rb
|
|
@@ -212,7 +147,10 @@ files:
|
|
|
212
147
|
- lib/test_prof/recipes/rspec/any_fixture.rb
|
|
213
148
|
- lib/test_prof/recipes/rspec/before_all.rb
|
|
214
149
|
- lib/test_prof/recipes/rspec/factory_default.rb
|
|
150
|
+
- lib/test_prof/recipes/rspec/let_it_be.rb
|
|
215
151
|
- lib/test_prof/recipes/rspec/sample.rb
|
|
152
|
+
- lib/test_prof/rspec_dissect.rb
|
|
153
|
+
- lib/test_prof/rspec_dissect/rspec.rb
|
|
216
154
|
- lib/test_prof/rspec_stamp.rb
|
|
217
155
|
- lib/test_prof/rspec_stamp/parser.rb
|
|
218
156
|
- lib/test_prof/rspec_stamp/rspec.rb
|
|
@@ -223,6 +161,8 @@ files:
|
|
|
223
161
|
- lib/test_prof/stack_prof/rspec.rb
|
|
224
162
|
- lib/test_prof/tag_prof.rb
|
|
225
163
|
- lib/test_prof/tag_prof/rspec.rb
|
|
164
|
+
- lib/test_prof/utils.rb
|
|
165
|
+
- lib/test_prof/utils/sized_ordered_set.rb
|
|
226
166
|
- lib/test_prof/version.rb
|
|
227
167
|
homepage: http://github.com/palkan/test-prof
|
|
228
168
|
licenses:
|
|
@@ -236,7 +176,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
236
176
|
requirements:
|
|
237
177
|
- - ">="
|
|
238
178
|
- !ruby/object:Gem::Version
|
|
239
|
-
version: 2.
|
|
179
|
+
version: 2.2.0
|
|
240
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
181
|
requirements:
|
|
242
182
|
- - ">="
|