profiling 2.3.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/profiling/engine.rb +13 -3
- data/lib/profiling/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dc6e9a87098345c0cef1eb925bb7255fd3722ed
|
4
|
+
data.tar.gz: 4255c2433487a11981d2c0fc5527d792e388d35b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71be0138fdb39dbc6a83f38d18b09472e4833f330fa31e4b1ff410055c3126b4a264589836e804b77d5670ed7934cb4639fc82d33d5d6ab02ea46093e6aa1930
|
7
|
+
data.tar.gz: 917530a65c98698f504d461874dc2020a6084698eacd36ba9a2aa71a35f013d7c8e212ff595689d73f59a465ff061020c759623aa2fee1aa419ca4bfb1cd41ce
|
data/README.md
CHANGED
data/lib/profiling/engine.rb
CHANGED
@@ -31,10 +31,10 @@ class Profiler
|
|
31
31
|
|
32
32
|
@results = profile.stop
|
33
33
|
|
34
|
-
# Optionally remove gems from the results
|
35
|
-
if !@results.threads.empty? &&
|
34
|
+
# Optionally remove gems (and the remainder of any standard lib) from the results
|
35
|
+
if !@results.threads.empty? && exclusion_regex
|
36
36
|
@results.threads.each do |thread|
|
37
|
-
thread.methods.each { |m| m.eliminate! if m.source_file.match(
|
37
|
+
thread.methods.each { |m| m.eliminate! if m.source_file.match(exclusion_regex) }
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -57,5 +57,15 @@ class Profiler
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
def exclusion_regex
|
61
|
+
regex = if config[:exclude_gems] && config[:exclude_standard_lib]
|
62
|
+
/\/lib\/ruby\//
|
63
|
+
elsif config[:exclude_gems]
|
64
|
+
/\/lib\/ruby\/gems\//
|
65
|
+
elsif config[:exclude_standard_lib]
|
66
|
+
/\/lib\/ruby\/[^g]/
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
60
70
|
end
|
61
71
|
end
|
data/lib/profiling/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: profiling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Duncalfe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
145
145
|
version: '0'
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.4.5.1
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: 'Non-discriminatory Ruby code profiling: This gem is a small wrapper around
|