Class Dtrace::Provider
In: lib/xray/dtrace/usdt/provider_extensions.rb
Parent: Object

Methods

fire   firing   load  

External Aliases

load -> original_load

Public Instance methods

[Source]

    # File lib/xray/dtrace/usdt/provider_extensions.rb, line 31
31:         def fire(function_name, *args)
32:           @@provider_module.send function_name do |p|
33:             p.fire(*args)
34:           end
35:         end

[Source]

    # File lib/xray/dtrace/usdt/provider_extensions.rb, line 20
20:         def firing(function_prefix, *args)
21:           @@provider_module.send "#{function_prefix}_start""#{function_prefix}_start" do |probe|
22:             probe.fire(*args)
23:           end
24:           result = yield
25:           @@provider_module.send "#{function_prefix}_end""#{function_prefix}_end" do |probe|
26:             probe.fire(*args)
27:           end
28:           result
29:         end

[Source]

    # File lib/xray/dtrace/usdt/provider_extensions.rb, line 14
14:     def load
15:       provider_module = original_load
16:       
17:       xray_extension_module = Module.new do
18:         @@provider_module = provider_module
19:         
20:         def firing(function_prefix, *args)
21:           @@provider_module.send "#{function_prefix}_start""#{function_prefix}_start" do |probe|
22:             probe.fire(*args)
23:           end
24:           result = yield
25:           @@provider_module.send "#{function_prefix}_end""#{function_prefix}_end" do |probe|
26:             probe.fire(*args)
27:           end
28:           result
29:         end
30: 
31:         def fire(function_name, *args)
32:           @@provider_module.send function_name do |p|
33:             p.fire(*args)
34:           end
35:         end
36: 
37:       end
38:               
39:       provider_module.const_set :XRay, xray_extension_module
40:       provider_module     
41:     end

[Validate]