call_graph 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/call_graph/instrument.rb +9 -5
- data/lib/call_graph/version.rb +1 -1
- data/lib/call_graph.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcd33a52fc43f59ef6091fe3a92434a95235f5f2e58566967bc7d7d3bf46349e
|
4
|
+
data.tar.gz: 10a27b36fc8564f215d460f86617af342fbeb3343c3d7bd11ffb6b2b46d263f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42592b022f1c7a19852a89ec357f64b326cac18db7b7151486912b6264cbdf203004ae6185d8c8e2b2c4e311a78436e9ad9aa642caf2fa7c11dc1f6daa14417e
|
7
|
+
data.tar.gz: 2bbab7ec72ac7683e40d91ae3e5b719f5145f24311caf5b0490c1aad8554094d4a057c3bfc7ddc6505113269f7f5e9fd43f9ddbd1a3d6f012bec9065790b07dd
|
@@ -46,11 +46,9 @@ module CallGraph
|
|
46
46
|
]
|
47
47
|
end
|
48
48
|
|
49
|
-
# :nocov:
|
50
|
-
# NOTE: - some calls outside the trace proc cause the vm to segvault.
|
51
|
-
# - i've be unable to extract methods because of the above.
|
52
49
|
def start
|
53
|
-
set_trace_func ->(event, file, _line, id, receiver_binding, classname)
|
50
|
+
set_trace_func ->(event, file, _line, id, receiver_binding, classname) do
|
51
|
+
# :nocov:
|
54
52
|
return if ignore_paths.any? { |path| file[path] }
|
55
53
|
|
56
54
|
case event
|
@@ -67,16 +65,22 @@ module CallGraph
|
|
67
65
|
receiver_class = receiver_class + ' ' + receiver_binding.eval("self.class == Class ? '(Class)' : '(Instance)'")
|
68
66
|
|
69
67
|
return if classname == CallGraph
|
68
|
+
return if classname == CallGraph::Instrument
|
70
69
|
return if caller_class == receiver_class
|
71
70
|
return if ignore_methods.include?(id)
|
72
71
|
|
73
72
|
set.add("#{caller_class},#{receiver_class},#{id}")
|
74
73
|
end
|
75
|
-
|
74
|
+
#:nocov:
|
75
|
+
end
|
76
76
|
end
|
77
77
|
|
78
78
|
def stop
|
79
|
+
set_trace_func nil
|
80
|
+
|
79
81
|
File.open(path(:tmp), 'w') { |fd| fd.write set.to_a.compact.join("\n") }
|
82
|
+
|
83
|
+
set.clear
|
80
84
|
end
|
81
85
|
end
|
82
86
|
end
|
data/lib/call_graph/version.rb
CHANGED
data/lib/call_graph.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: call_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Moriarty
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02
|
11
|
+
date: 2019-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: binding_of_caller
|