Module: Vivarium::Usdt
- Defined in:
- lib/vivarium/usdt.rb,
lib/vivarium/usdt_version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .__error_id_table ⇒ Object
- .__method_id_table ⇒ Object
- .get_error_name(u64) ⇒ Object
- .get_method_name(u64) ⇒ Object
- .raise(error_name) ⇒ Object
- .register_or_resolve_method(method_signature) ⇒ Object
- .start(defined_class, method_name) ⇒ Object
- .stop(defined_class, method_name) ⇒ Object
Class Method Details
.__error_id_table ⇒ Object
10 11 12 |
# File 'lib/vivarium/usdt.rb', line 10 def __error_id_table @__error_id_table ||= {} end |
.__method_id_table ⇒ Object
6 7 8 |
# File 'lib/vivarium/usdt.rb', line 6 def __method_id_table @__method_id_table ||= {} end |
.get_error_name(u64) ⇒ Object
19 20 21 |
# File 'lib/vivarium/usdt.rb', line 19 def get_error_name(u64) __error_id_table[u64] end |
.get_method_name(u64) ⇒ Object
15 16 17 |
# File 'lib/vivarium/usdt.rb', line 15 def get_method_name(u64) __method_id_table[u64] end |
.raise(error_name) ⇒ Object
41 42 43 44 45 |
# File 'lib/vivarium/usdt.rb', line 41 def raise(error_name) error_id = __helper_get_hash_from_name(error_name) __error_id_table[error_id] ||= error_name ::VivariumUsdt.invoke_raise_probe(error_id) end |
.register_or_resolve_method(method_signature) ⇒ Object
23 24 25 26 27 |
# File 'lib/vivarium/usdt.rb', line 23 def register_or_resolve_method(method_signature) id = __helper_get_hash_from_name(method_signature) __method_id_table[id] ||= method_signature id end |
.start(defined_class, method_name) ⇒ Object
29 30 31 32 33 |
# File 'lib/vivarium/usdt.rb', line 29 def start(defined_class, method_name) method_signature = "#{defined_class}##{method_name}" method_id = register_or_resolve_method(method_signature) ::VivariumUsdt.invoke_start_probe(method_id) end |
.stop(defined_class, method_name) ⇒ Object
35 36 37 38 39 |
# File 'lib/vivarium/usdt.rb', line 35 def stop(defined_class, method_name) method_signature = "#{defined_class}##{method_name}" method_id = register_or_resolve_method(method_signature) ::VivariumUsdt.invoke_stop_probe(method_id) end |