Module: Datadog::Profiling::NativeExtension
- Defined in:
- lib/ddtrace/profiling/native_extension.rb,
ext/ddtrace_profiling_native_extension/profiling.c
Overview
This module contains classes and methods which are implemented using native code in the ext/ddtrace_profiling_native_extension folder, as well as some Ruby-level utilities that don't make sense to write using C
Class Method Summary collapse
-
.clock_id_for(_) ⇒ Object
from clock_id.h.
- .cpu_time_ns_for(thread) ⇒ Object
- .native_working? ⇒ Boolean
Class Method Details
.clock_id_for(_) ⇒ Object
from clock_id.h
19 20 21 |
# File 'lib/ddtrace/profiling/native_extension.rb', line 19 def self.clock_id_for(_) nil end |
.cpu_time_ns_for(thread) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ddtrace/profiling/native_extension.rb', line 24 def self.cpu_time_ns_for(thread) clock_id = begin clock_id_for(thread) rescue Errno::ESRCH nil end begin ::Process.clock_gettime(clock_id, :nanosecond) if clock_id rescue Errno::EINVAL nil end end |
.native_working? ⇒ Boolean
5 6 7 |
# File 'ext/ddtrace_profiling_native_extension/profiling.c', line 5 private_class_method def self.native_working? false end |