-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2700 from DataDog/ivoanjo/profiling-typechecking
Add type signatures for a bunch of profiling classes
- Loading branch information
Showing
40 changed files
with
588 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Datadog | ||
module Core | ||
module Buffer | ||
class Random | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Datadog | ||
module Core | ||
module Buffer | ||
class ThreadSafe < Datadog::Core::Buffer::Random | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module Datadog | ||
module Core | ||
class Worker | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Datadog | ||
module Core | ||
module Workers | ||
module Polling | ||
SHUTDOWN_TIMEOUT: 1 | ||
|
||
def self.included: (Class | Module base) -> void | ||
|
||
module PrependedMethods | ||
def perform: (*untyped args) -> untyped | ||
end | ||
|
||
def stop: (?bool force_stop, ?::Integer timeout) -> untyped | ||
|
||
def enabled?: () -> bool | ||
|
||
def enabled=: (bool value) -> bool | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module Datadog | ||
module Profiling | ||
GOOGLE_PROTOBUF_MINIMUM_VERSION: ::Gem::Version | ||
|
||
self.@protobuf_loaded: bool | ||
|
||
def self.supported?: () -> bool | ||
|
||
def self.unsupported_reason: () -> ::String? | ||
|
||
def self.start_if_enabled: () -> bool | ||
|
||
def self.allocation_count: () -> ::Integer? | ||
|
||
def self.replace_noop_allocation_count: () -> void | ||
|
||
def self.native_library_compilation_skipped?: () -> ::String? | ||
|
||
def self.try_reading_skipped_reason_file: (?untyped file_api) -> ::String? | ||
|
||
def self.protobuf_gem_unavailable?: () -> ::String? | ||
|
||
def self.protobuf_version_unsupported?: () -> ::String? | ||
|
||
def self.protobuf_already_loaded?: () -> bool | ||
|
||
def self.protobuf_failed_to_load?: () -> ::String? | ||
|
||
def self.protobuf_loaded_successfully?: () -> bool | ||
|
||
def self.native_library_failed_to_load?: () -> ::String? | ||
|
||
def self.try_loading_native_library: () -> [bool, ::Exception?] | ||
|
||
def self.load_profiling: () -> bool | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module Datadog | ||
module Profiling | ||
module Collectors | ||
class CodeProvenance | ||
def refresh: () -> self | ||
def generate_json: () -> ::String | ||
end | ||
end | ||
end | ||
end |
20 changes: 20 additions & 0 deletions
20
sig/datadog/profiling/collectors/cpu_and_wall_time_worker.rbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module Datadog | ||
module Profiling | ||
module Collectors | ||
class CpuAndWallTimeWorker | ||
def self._native_allocation_count: () -> ::Integer? | ||
|
||
def initialize: ( | ||
recorder: Datadog::Profiling::StackRecorder, | ||
max_frames: ::Integer, | ||
tracer: Datadog::Tracing::Tracer?, | ||
endpoint_collection_enabled: bool, | ||
gc_profiling_enabled: bool, | ||
allocation_counting_enabled: bool, | ||
?thread_context_collector: Datadog::Profiling::Collectors::ThreadContext, | ||
?idle_sampling_helper: Datadog::Profiling::Collectors::IdleSamplingHelper, | ||
) -> void | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module Datadog | ||
module Profiling | ||
module Collectors | ||
module DynamicSamplingRate | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
module Datadog | ||
module Profiling | ||
module Collectors | ||
class IdleSamplingHelper | ||
@worker_thread: untyped | ||
@start_stop_mutex: ::Thread::Mutex | ||
|
||
private | ||
|
||
attr_accessor failure_exception: ::Exception? | ||
|
||
public | ||
|
||
def initialize: () -> void | ||
|
||
def start: () -> (nil | true) | ||
|
||
def stop: (*untyped _unused) -> void | ||
|
||
def self._native_stop: (Datadog::Profiling::Collectors::IdleSamplingHelper self_instance) -> true | ||
|
||
def self._native_reset: (Datadog::Profiling::Collectors::IdleSamplingHelper self_instance) -> true | ||
|
||
def self._native_idle_sampling_loop: (Datadog::Profiling::Collectors::IdleSamplingHelper self_instance) -> true | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module Datadog | ||
module Profiling | ||
module Collectors | ||
class OldStack < Core::Worker | ||
include Core::Workers::Polling | ||
|
||
def initialize: ( | ||
OldRecorder recorder, | ||
max_frames: ::Integer, | ||
trace_identifiers_helper: Datadog::Profiling::TraceIdentifiers::Helper, | ||
?ignore_thread: ::Proc?, | ||
?max_time_usage_pct: ::Float, | ||
?max_threads_sampled: ::Integer, | ||
?thread_api: untyped, | ||
?cpu_time_provider: untyped, | ||
?fork_policy: untyped, | ||
?interval: ::Float, | ||
?enabled: bool, | ||
) -> void | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.