trace_tree 0.1.4 → 0.1.5

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: 5ee0aca382b4cf453d1a686ee889f6dd7717bc55
4
- data.tar.gz: 45677cc8e22cf0b570c956ef0ddb4900fab9856f
3
+ metadata.gz: 61abf8b8eb854ce8d3e93fc91d23960dabbe84a7
4
+ data.tar.gz: 186f668d5103867abc4d4074089572a915fcc998
5
5
  SHA512:
6
- metadata.gz: bfa005442e08b5293d2c6a8b26eb98155e4c678b96e015ed41deb863dbefa9534f17fb09d8a7eaa75c5b6ba09f7d5420dd61ea6054f2b2b959df8898d6e2206a
7
- data.tar.gz: beca1bd006605d215528f349ea34cf49dbece736d403b2e8402ce4261320370bc3641e748275e545def5b176b80ed534228074f7aebee73958845468b2815890
6
+ metadata.gz: '08a9e7fc44e86dbef35a42fef9e1b8e8ec962d7a6a9d27915010d2db61333e61f984a79b4cddde4b3eb7352d753b16aa7deb7b2628ed2b3a1a27fe6c766f4918'
7
+ data.tar.gz: d573b3701bc9c2183aeff0af9c311839cded6db1bdbe571cb5f819805a9b5cda2854cdd23fcea9ff1be3a68a14f9e8ed026f4628d380915b8d59ff01c77d889d
@@ -8,7 +8,6 @@ class TraceTree
8
8
  include TreeHtmlable
9
9
 
10
10
  attr_reader :bindings
11
- attr_accessor :parent
12
11
 
13
12
  def initialize trace_point
14
13
  @event = trace_point.event
@@ -18,7 +17,6 @@ class TraceTree
18
17
 
19
18
  def << node
20
19
  callees << node
21
- node.parent = self
22
20
  end
23
21
 
24
22
  def callees
@@ -14,7 +14,7 @@ class TraceTree
14
14
  end
15
15
 
16
16
  def to_s
17
- record.map{|k,v| "#{k}: #{ftime v[0]} ~ #{ftime v[-1]} = #{v[-1] - v[0]}"}
17
+ Hash[record.map{|k,v| [k, v[-1] - v[0]]}].to_s
18
18
  end
19
19
 
20
20
  private
@@ -5,15 +5,6 @@ class TraceTree
5
5
 
6
6
  include TreeGraph
7
7
 
8
- def parent_for_tree_graph
9
- parent
10
- end
11
-
12
- def is_last_for_tree_graph
13
- return true unless parent
14
- parent.callees.index(self) == (parent.callees.count - 1)
15
- end
16
-
17
8
  def label_for_tree_graph
18
9
  "#{class_and_method} #{source_location}"
19
10
  end
@@ -1,3 +1,3 @@
1
1
  class TraceTree
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/trace_tree.rb CHANGED
@@ -36,7 +36,7 @@ class TraceTree
36
36
  attr_reader :bi, :trace_points, :log, :build_command, :timer, :opt
37
37
 
38
38
  def start_trace
39
- timer[:to_do]
39
+ timer[:trace]
40
40
  @tp = TracePoint.trace(:call, :b_call, :raise, :c_call) do |point|
41
41
  trace_points << @node_class.new(point) if wanted? point
42
42
  end
@@ -45,7 +45,7 @@ class TraceTree
45
45
  def stop_trace
46
46
  return unless @tp
47
47
  @tp.disable
48
- timer[:to_do]
48
+ timer[:trace]
49
49
  dump_trace_tree
50
50
  end
51
51
 
data/trace_tree.gemspec CHANGED
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "minitest", "~> 5.0"
26
26
 
27
27
  spec.add_dependency "binding_of_callers", "0.1.3"
28
- spec.add_dependency "tree_graph", "~> 0.1.0"
28
+ spec.add_dependency "tree_graph", "~> 0.2.0"
29
29
  spec.add_dependency "tree_html", "~> 0.1.0"
30
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trace_tree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - ken
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.1.0
75
+ version: 0.2.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.1.0
82
+ version: 0.2.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: tree_html
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.5.2
144
+ rubygems_version: 2.6.8
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Print TracePoint(normal ruby call, block call, raise call, throw call) in