profiling 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef6ab1c0eb6d1cfa5310145727932019d4a4b78c
4
- data.tar.gz: 9fefbe268928a91982f888e339bed26b975f051d
3
+ metadata.gz: 0cfec5331ddecfe74e80d46d6f222741538e5874
4
+ data.tar.gz: 460a9384930e56eaa3f6d513a1b7ab650bb0f008
5
5
  SHA512:
6
- metadata.gz: cc864dac128163bed40eba1db4672865edb8af3a5e5655b416253ff0b987e584f7511d2ba6a598570b0560843204632685d7ba51db2e6802f06279486c7a9a1e
7
- data.tar.gz: 4615f84cacf2dc504fd5f5e2b5684be7c0fd41741747d445f2a510b86fa9411fba48b9230c1324a1f602386b32926f84448264c9aa39bcc625e384216b188ab5
6
+ metadata.gz: ad10718ef797fef7522e6b8de5c8931e4bfdbbaaee48f79d74f679abe8d8fcd20fa926457ca9626dab7e0b4894855891b3ee61fea2497c84363588efc2260eda
7
+ data.tar.gz: ebe9c9f9d0b302f27c07a0b9cf9659f88f8e529901abdbf9f8f9a1a4fc0f940c2c82cb3ec032a36df9aceca6e1eecf71aaf6fbcbd308368c443957ba27bc7aca
data/README.md CHANGED
@@ -12,7 +12,7 @@ Non-discriminatory profiling for your MRI Ruby code. This gem is a small wrapper
12
12
  Add this line to your application's Gemfile:
13
13
 
14
14
  ```ruby
15
- gem 'profiling', "~> 2.0"
15
+ gem 'profiling', "~> 2.1"
16
16
  ```
17
17
 
18
18
  And then execute:
@@ -29,17 +29,11 @@ class Profiler
29
29
 
30
30
  @results = profile.stop
31
31
 
32
- # Remove certain things from the profiling
33
- unless @results.threads.empty?
34
- exclude_paths = []
35
-
36
- if config[:exclude_gems]
37
- exclude_paths << /\/gems\//
38
- end
39
-
40
- unless exclude_paths.empty?
41
- @results.threads.first.methods.each do |method|
42
- if exclude_paths.any?{|regex| method.source_file.match(regex) }
32
+ # Optionally remove gems from the results
33
+ if !@results.threads.empty? && config[:exclude_gems]
34
+ @results.threads.each do |thread|
35
+ thread.methods.each do |method|
36
+ if method.source_file.match(/\/gems\//)
43
37
  method.eliminate!
44
38
  end
45
39
  end
@@ -1,3 +1,3 @@
1
1
  class Profiler
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profiling
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Duncalfe