test-prof 0.11.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,8 @@ if ENV["SAMPLE"]
15
15
  RSpec.configure do |config|
16
16
  config.before(:suite) do
17
17
  filtered_examples = RSpec.world.filtered_examples.values.flatten
18
- sample = filtered_examples.sample(ENV["SAMPLE"].to_i)
18
+ random = Random.new(RSpec.configuration.seed)
19
+ sample = filtered_examples.sample(ENV["SAMPLE"].to_i, random: random)
19
20
  RSpec.world.filtered_examples = Hash.new do |hash, group|
20
21
  hash[group] = group.examples & sample
21
22
  end
@@ -31,7 +32,8 @@ if ENV["SAMPLE_GROUPS"]
31
32
  filtered_groups = RSpec.world.filtered_examples.reject do |_group, examples|
32
33
  examples.empty?
33
34
  end.keys
34
- sample = filtered_groups.sample(ENV["SAMPLE_GROUPS"].to_i)
35
+ random = Random.new(RSpec.configuration.seed)
36
+ sample = filtered_groups.sample(ENV["SAMPLE_GROUPS"].to_i, random: random)
35
37
  RSpec.world.filtered_examples = Hash.new do |hash, group|
36
38
  hash[group] = sample.include?(group) ? group.examples : []
37
39
  end
@@ -36,6 +36,9 @@ module TestProf
36
36
  else
37
37
  "html"
38
38
  end
39
+
40
+ sample_interval = ENV["TEST_STACK_PROF_INTERVAL"].to_i
41
+ @interval = sample_interval > 0 ? sample_interval : nil
39
42
  end
40
43
 
41
44
  def raw?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TestProf
4
- VERSION = "0.11.0"
4
+ VERSION = "0.12.1"
5
5
  end
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.11.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-09 00:00:00.000000000 Z
11
+ date: 2020-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '12.0'
33
+ version: '13.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '12.0'
40
+ version: '13.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -56,42 +56,42 @@ dependencies:
56
56
  name: isolator
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.6'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.6'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '5.9'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '5.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.77.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.77.0
97
97
  description: "\n Ruby applications tests profiling tools.\n\n Contains tools
@@ -118,6 +118,7 @@ files:
118
118
  - assets/src/d3.v4.min.js
119
119
  - assets/tagprof.demo.html
120
120
  - assets/tagprof.template.html
121
+ - config/default.yml
121
122
  - lib/minitest/base_reporter.rb
122
123
  - lib/minitest/event_prof_formatter.rb
123
124
  - lib/minitest/test_prof_plugin.rb
@@ -207,15 +208,15 @@ files:
207
208
  - lib/test_prof/utils/rspec.rb
208
209
  - lib/test_prof/utils/sized_ordered_set.rb
209
210
  - lib/test_prof/version.rb
210
- homepage: http://github.com/palkan/test-prof
211
+ homepage: http://github.com/test-prof/test-prof
211
212
  licenses:
212
213
  - MIT
213
214
  metadata:
214
- bug_tracker_uri: http://github.com/palkan/test-prof/issues
215
- changelog_uri: https://github.com/palkan/test-prof/blob/master/CHANGELOG.md
215
+ bug_tracker_uri: http://github.com/test-prof/test-prof/issues
216
+ changelog_uri: https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md
216
217
  documentation_uri: https://test-prof.evilmartians.io/
217
218
  homepage_uri: https://test-prof.evilmartians.io/
218
- source_code_uri: http://github.com/palkan/test-prof
219
+ source_code_uri: http://github.com/test-prof/test-prof
219
220
  post_install_message:
220
221
  rdoc_options: []
221
222
  require_paths:
@@ -224,7 +225,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
224
225
  requirements:
225
226
  - - ">="
226
227
  - !ruby/object:Gem::Version
227
- version: 2.4.0
228
+ version: 2.5.0
228
229
  required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  requirements:
230
231
  - - ">="