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 +4 -4
- data/README.md +1 -1
- data/lib/profiling/engine.rb +5 -11
- data/lib/profiling/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cfec5331ddecfe74e80d46d6f222741538e5874
|
4
|
+
data.tar.gz: 460a9384930e56eaa3f6d513a1b7ab650bb0f008
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad10718ef797fef7522e6b8de5c8931e4bfdbbaaee48f79d74f679abe8d8fcd20fa926457ca9626dab7e0b4894855891b3ee61fea2497c84363588efc2260eda
|
7
|
+
data.tar.gz: ebe9c9f9d0b302f27c07a0b9cf9659f88f8e529901abdbf9f8f9a1a4fc0f940c2c82cb3ec032a36df9aceca6e1eecf71aaf6fbcbd308368c443957ba27bc7aca
|
data/README.md
CHANGED
data/lib/profiling/engine.rb
CHANGED
@@ -29,17 +29,11 @@ class Profiler
|
|
29
29
|
|
30
30
|
@results = profile.stop
|
31
31
|
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
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
|
data/lib/profiling/version.rb
CHANGED