Class: TraceTree
- Inherits:
-
Object
show all
- Defined in:
- lib/trace_tree.rb,
lib/trace_tree/args.rb,
lib/trace_tree/warm.rb,
lib/trace_tree/color.rb,
lib/trace_tree/point.rb,
lib/trace_tree/point.rb,
lib/trace_tree/timer.rb,
lib/trace_tree/config.rb,
lib/trace_tree/version.rb,
lib/trace_tree/tmp_file.rb,
lib/trace_tree/gem_paths.rb,
lib/trace_tree/point/omit.rb,
lib/trace_tree/point/common.rb,
lib/trace_tree/return_value.rb,
lib/trace_tree/tree_htmlable.rb,
lib/trace_tree/short_gem_path.rb,
lib/trace_tree/tree_graphable.rb,
lib/trace_tree/point/threadend.rb,
lib/trace_tree/point/threadbegin.rb,
lib/trace_tree/point/ccall_kernel_raise.rb,
lib/trace_tree/point/ccall_kernel_extend.rb,
lib/trace_tree/point/ccall_module_include.rb,
lib/trace_tree/point/ccall_module_prepend.rb,
lib/trace_tree/point/ccall_classthread_new.rb,
lib/trace_tree/point/ccall_thread_initialize.rb,
lib/trace_tree/point/creturn_classthread_new.rb,
lib/trace_tree/point/ccall_module_extendobject.rb,
lib/trace_tree/point/creturn_thread_initialize.rb,
lib/trace_tree/point/ccall_module_appendfeatures.rb,
lib/trace_tree/point/creturn_module_extendobject.rb,
lib/trace_tree/point/ccall_module_prependfeatures.rb,
lib/trace_tree/point/creturn_module_appendfeatures.rb,
lib/trace_tree/point/call_modulemutexm_extendobject.rb,
lib/trace_tree/point/creturn_module_prependfeatures.rb,
lib/trace_tree/point/call_activesupportconcern_appendfeatures.rb
Defined Under Namespace
Modules: Args, Color, ConsoleReturnValue, LuxuryReturnValue, ReturnValue, ShortGemPath, TreeGraphable, TreeHtmlable, Warm
Classes: Config, Point, Timer, TmpFile
Constant Summary
collapse
- MainFile =
__FILE__
- Events =
[:b_call, :b_return,
:c_call, :c_return,
:call, :return,
:class, :end,
:thread_begin, :thread_end]
- VERSION =
"0.2.17"
- GemPaths =
{}
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
35
36
37
38
39
40
|
# File 'lib/trace_tree.rb', line 35
def initialize bi
@bi = bi
@trace_points = Queue.new
@timer = Timer.new
@config = Config.load
end
|
Class Method Details
.tmp ⇒ Object
6
7
8
|
# File 'lib/trace_tree/tmp_file.rb', line 6
def tmp
Dir.tmpdir
end
|
Instance Method Details
#generate(*log, **opt, &to_do) ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/trace_tree.rb', line 42
def generate *log, **opt, &to_do
@opt = opt
@log = dump_location *log
@debug = TmpFile.new opt[:debug] if opt[:debug]
enhance_point
@build_command = (opt[:html] || opt[:htmp]) ? :tree_html_full : :tree_graph
make_filter
@__file__, @__line__, there = bi.eval('[__FILE__, __LINE__, self]')
timer[:trace]
@tp = TracePoint.new *Events, &@deal
@tp.enable
there.instance_eval &to_do
ensure
return unless @tp
@tp.disable
timer[:trace]
dump_trace_tree
end
|