test-prof 0.11.0 → 0.12.1
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 +109 -446
- data/LICENSE.txt +1 -1
- data/README.md +9 -13
- data/config/default.yml +35 -0
- data/lib/minitest/test_prof_plugin.rb +3 -0
- data/lib/test_prof/before_all.rb +0 -4
- data/lib/test_prof/cops/inject.rb +16 -14
- data/lib/test_prof/cops/rspec/aggregate_examples.rb +2 -2
- data/lib/test_prof/cops/rspec/aggregate_examples/its.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/line_range_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/matchers_with_side_effects.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/metadata_helpers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_examples/node_matchers.rb +1 -1
- data/lib/test_prof/cops/rspec/aggregate_failures.rb +2 -4
- data/lib/test_prof/event_prof/instrumentations/active_support.rb +22 -4
- data/lib/test_prof/ext/active_record_3.rb +1 -1
- data/lib/test_prof/recipes/minitest/sample.rb +6 -10
- data/lib/test_prof/recipes/rspec/before_all.rb +1 -9
- data/lib/test_prof/recipes/rspec/let_it_be.rb +108 -11
- data/lib/test_prof/recipes/rspec/sample.rb +4 -2
- data/lib/test_prof/stack_prof.rb +3 -0
- data/lib/test_prof/version.rb +1 -1
- metadata +16 -15
| @@ -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 | 
            -
                   | 
| 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 | 
            -
                   | 
| 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
         | 
    
        data/lib/test_prof/stack_prof.rb
    CHANGED
    
    
    
        data/lib/test_prof/version.rb
    CHANGED
    
    
    
        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.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- | 
| 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: ' | 
| 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: ' | 
| 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/ | 
| 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/ | 
| 215 | 
            -
              changelog_uri: https://github.com/ | 
| 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/ | 
| 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. | 
| 228 | 
            +
                  version: 2.5.0
         | 
| 228 229 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 229 230 | 
             
              requirements:
         | 
| 230 231 | 
             
              - - ">="
         |