libddprof 0.2.0.1.0.beta3-x86_64-linux → 0.6.0.1.0-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libddprof/version.rb +2 -2
- data/lib/libddprof.rb +3 -8
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/LICENSE +0 -0
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/LICENSE-3rdparty.yml +329 -87
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/NOTICE +0 -0
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/include/ddprof/ffi.h +232 -132
- data/vendor/libddprof-0.6.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/lib/libddprof_ffi.so +0 -0
- data/vendor/{libddprof-0.2.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/lib/pkgconfig/ddprof_ffi.pc → libddprof-0.6.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/lib/pkgconfig/ddprof_ffi_with_rpath.pc} +3 -3
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/LICENSE +0 -0
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/LICENSE-3rdparty.yml +329 -87
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/NOTICE +0 -0
- data/vendor/{libddprof-0.2.0 → libddprof-0.6.0}/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/include/ddprof/ffi.h +232 -132
- data/vendor/libddprof-0.6.0/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/lib/libddprof_ffi.so +0 -0
- data/vendor/{libddprof-0.2.0/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/lib/pkgconfig/ddprof_ffi.pc → libddprof-0.6.0/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/lib/pkgconfig/ddprof_ffi_with_rpath.pc} +3 -3
- metadata +17 -25
- data/.rspec +0 -3
- data/.standard.yml +0 -3
- data/README.md +0 -29
- data/Rakefile +0 -151
- data/docker-compose.yml +0 -14
- data/gems.rb +0 -13
- data/vendor/libddprof-0.2.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/cmake/DDProfConfig.cmake +0 -41
- data/vendor/libddprof-0.2.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/lib/libddprof_ffi.a +0 -0
- data/vendor/libddprof-0.2.0/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/cmake/DDProfConfig.cmake +0 -41
- data/vendor/libddprof-0.2.0/x86_64-linux-musl/libddprof-x86_64-alpine-linux-musl/lib/libddprof_ffi.a +0 -0
data/README.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# libddprof Ruby gem
|
2
|
-
|
3
|
-
`libddprof` provides a shared library containing common code used in the implementation of Datadog's
|
4
|
-
[Continuous Profilers](https://docs.datadoghq.com/tracing/profiler/).
|
5
|
-
|
6
|
-
**NOTE**: If you're building a new profiler or want to contribute to Datadog's existing profilers, you've come to the
|
7
|
-
right place!
|
8
|
-
Otherwise, this is possibly not the droid you were looking for.
|
9
|
-
|
10
|
-
## Development
|
11
|
-
|
12
|
-
Run `bundle exec rake` to run the tests and the style autofixer.
|
13
|
-
You can also run `bundle exec pry` for an interactive prompt that will allow you to experiment.
|
14
|
-
|
15
|
-
## Releasing a new version to rubygems.org
|
16
|
-
|
17
|
-
Note: No Ruby needed to run this! It all runs inside docker :)
|
18
|
-
|
19
|
-
1. [ ] Locate the new libddprof release on GitHub: <https://github.com/DataDog/libddprof/releases>
|
20
|
-
2. [ ] Update the `LIB_GITHUB_RELEASES` section of the <Rakefile> with the new version
|
21
|
-
3. [ ] Update the <lib/libddprof/version.rb> file with the `LIB_VERSION` and `VERSION` to use
|
22
|
-
4. [ ] Commit change, open PR, get it merged
|
23
|
-
5. [ ] Release by running `docker-compose run push_to_rubygems`.
|
24
|
-
(When asked for rubygems credentials, check your local friendly 1Password.)
|
25
|
-
6. [ ] Verify that release shows up correctly on: <https://rubygems.org/gems/libddprof>
|
26
|
-
|
27
|
-
## Contributing
|
28
|
-
|
29
|
-
See <../CONTRIBUTING.md>.
|
data/Rakefile
DELETED
@@ -1,151 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "bundler/gem_tasks"
|
4
|
-
require "rspec/core/rake_task"
|
5
|
-
require "standard/rake" unless RUBY_VERSION < "2.5"
|
6
|
-
|
7
|
-
require "fileutils"
|
8
|
-
require "http"
|
9
|
-
require "pry"
|
10
|
-
require "rubygems/package"
|
11
|
-
|
12
|
-
RSpec::Core::RakeTask.new(:spec)
|
13
|
-
|
14
|
-
LIB_GITHUB_RELEASES = {
|
15
|
-
"0.2.0" => [
|
16
|
-
{
|
17
|
-
file: "libddprof-x86_64-unknown-linux-gnu.tar.gz",
|
18
|
-
sha256: "cba0f24074d44781d7252b912faff50d330957e84a8f40a172a8138e81001f27",
|
19
|
-
ruby_platform: "x86_64-linux"
|
20
|
-
},
|
21
|
-
{
|
22
|
-
file: "libddprof-x86_64-alpine-linux-musl.tar.gz",
|
23
|
-
sha256: "d519a6241d78260522624b8e79e98502510f11d5d9551f5f80fc1134e95fa146",
|
24
|
-
ruby_platform: "x86_64-linux-musl"
|
25
|
-
}
|
26
|
-
]
|
27
|
-
# Add more versions here
|
28
|
-
}
|
29
|
-
|
30
|
-
task default: [
|
31
|
-
:spec,
|
32
|
-
(:'standard:fix' unless RUBY_VERSION < "2.5")
|
33
|
-
].compact
|
34
|
-
|
35
|
-
desc "Download lib release from github"
|
36
|
-
task :fetch do
|
37
|
-
Helpers.each_github_release_variant do |file:, sha256:, target_directory:, target_file:, **_|
|
38
|
-
target_url = "https://github.com/DataDog/libddprof/releases/download/v#{Libddprof::LIB_VERSION}/#{file}"
|
39
|
-
|
40
|
-
if File.exist?(target_file)
|
41
|
-
target_file_hash = Digest::SHA256.hexdigest(File.read(target_file))
|
42
|
-
|
43
|
-
if target_file_hash == sha256
|
44
|
-
puts "Found #{target_file} matching the expected sha256, skipping download"
|
45
|
-
next
|
46
|
-
else
|
47
|
-
puts "Found #{target_file} with hash (#{target_file_hash}) BUT IT DID NOT MATCH THE EXPECTED sha256 (#{sha256}), downloading it again..."
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
puts "Going to download #{target_url} into #{target_file}"
|
52
|
-
|
53
|
-
File.open(target_file, "wb") do |file|
|
54
|
-
HTTP.follow.get(target_url).body.each { |chunk| file.write(chunk) }
|
55
|
-
end
|
56
|
-
|
57
|
-
if Digest::SHA256.hexdigest(File.read(target_file)) == sha256
|
58
|
-
puts "Success!"
|
59
|
-
else
|
60
|
-
raise "Downloaded file is corrupt, does not match expected sha256"
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
desc "Extract lib downloaded releases"
|
66
|
-
task extract: [:fetch] do
|
67
|
-
Helpers.each_github_release_variant do |target_directory:, target_file:, **_|
|
68
|
-
puts "Extracting #{target_file}"
|
69
|
-
File.open(target_file, "rb") do |file|
|
70
|
-
Gem::Package.new("").extract_tar_gz(file, target_directory)
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
desc "Package lib downloaded releases as gems"
|
76
|
-
task package: [:spec, :'standard:fix', :extract] do
|
77
|
-
gemspec = eval(File.read("libddprof.gemspec"), nil, "libddprof.gemspec") # standard:disable Security/Eval
|
78
|
-
FileUtils.mkdir_p("pkg")
|
79
|
-
|
80
|
-
Helpers.package_without_binaries(gemspec)
|
81
|
-
Helpers.package_linux_x86_64(gemspec)
|
82
|
-
end
|
83
|
-
|
84
|
-
desc "Release all packaged gems"
|
85
|
-
task push_to_rubygems: [
|
86
|
-
:package,
|
87
|
-
:'release:guard_clean'
|
88
|
-
] do
|
89
|
-
system("gem signout") # make sure there are no existing credentials in use
|
90
|
-
|
91
|
-
system("gem push pkg/libddprof-#{Libddprof::VERSION}.gem")
|
92
|
-
system("gem push pkg/libddprof-#{Libddprof::VERSION}-x86_64-linux.gem")
|
93
|
-
|
94
|
-
system("gem signout") # leave no credentials behind
|
95
|
-
end
|
96
|
-
|
97
|
-
module Helpers
|
98
|
-
def self.each_github_release_variant(version: Libddprof::LIB_VERSION)
|
99
|
-
LIB_GITHUB_RELEASES.fetch(version).each do |variant|
|
100
|
-
file = variant.fetch(:file)
|
101
|
-
sha256 = variant.fetch(:sha256)
|
102
|
-
ruby_platform = variant.fetch(:ruby_platform)
|
103
|
-
|
104
|
-
# These two are so common that we just centralize them here
|
105
|
-
target_directory = "vendor/libddprof-#{version}/#{ruby_platform}"
|
106
|
-
target_file = "#{target_directory}/#{file}"
|
107
|
-
|
108
|
-
FileUtils.mkdir_p(target_directory)
|
109
|
-
|
110
|
-
yield(file: file, sha256: sha256, ruby_platform: ruby_platform, target_directory: target_directory, target_file: target_file)
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
def self.package_without_binaries(gemspec)
|
115
|
-
target_gemspec = gemspec.dup
|
116
|
-
|
117
|
-
puts "Building a variant without binaries including:"
|
118
|
-
pp target_gemspec.files
|
119
|
-
|
120
|
-
package = Gem::Package.build(target_gemspec)
|
121
|
-
FileUtils.mv(package, "pkg")
|
122
|
-
puts("-" * 80)
|
123
|
-
end
|
124
|
-
|
125
|
-
def self.package_linux_x86_64(gemspec)
|
126
|
-
# We include both glibc and musl variants in the same binary gem to avoid the issues
|
127
|
-
# documented in https://github.com/rubygems/rubygems/issues/3174
|
128
|
-
target_gemspec = gemspec.dup
|
129
|
-
target_gemspec.files += files_for("x86_64-linux", "x86_64-linux-musl")
|
130
|
-
target_gemspec.platform = "x86_64-linux"
|
131
|
-
|
132
|
-
puts "Building for x86_64-linux including: (this can take a while)"
|
133
|
-
pp target_gemspec.files
|
134
|
-
|
135
|
-
package = Gem::Package.build(target_gemspec)
|
136
|
-
FileUtils.mv(package, "pkg")
|
137
|
-
puts("-" * 80)
|
138
|
-
end
|
139
|
-
|
140
|
-
def self.files_for(*included_platforms, version: Libddprof::LIB_VERSION)
|
141
|
-
files = []
|
142
|
-
|
143
|
-
each_github_release_variant(version: version) do |ruby_platform:, target_directory:, target_file:, **_|
|
144
|
-
next unless included_platforms.include?(ruby_platform)
|
145
|
-
|
146
|
-
files += Dir.glob("#{target_directory}/**/*").select { |path| File.file?(path) } - [target_file]
|
147
|
-
end
|
148
|
-
|
149
|
-
files
|
150
|
-
end
|
151
|
-
end
|
data/docker-compose.yml
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
version: '3.2'
|
2
|
-
services:
|
3
|
-
push_to_rubygems:
|
4
|
-
image: ruby:3.1
|
5
|
-
platform: linux/x86_64
|
6
|
-
stdin_open: true
|
7
|
-
tty: true
|
8
|
-
command: bash -c 'cd /libddprof/ruby && bundle install && bundle exec rake push_to_rubygems'
|
9
|
-
volumes:
|
10
|
-
- ..:/libddprof
|
11
|
-
- bundle-3.1:/usr/local/bundle
|
12
|
-
|
13
|
-
volumes:
|
14
|
-
bundle-3.1:
|
data/gems.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in libddprof.gemspec
|
6
|
-
gemspec
|
7
|
-
|
8
|
-
gem "rake", "~> 13.0"
|
9
|
-
gem "rspec", "~> 3.10"
|
10
|
-
gem "standard", "~> 1.3" unless RUBY_VERSION < "2.5"
|
11
|
-
gem "http", "~> 5.0"
|
12
|
-
gem "pry"
|
13
|
-
gem "pry-byebug"
|
data/vendor/libddprof-0.2.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/cmake/DDProfConfig.cmake
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
2
|
-
# This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc.
|
3
|
-
include(FindPackageHandleStandardArgs)
|
4
|
-
|
5
|
-
if (DEFINED ENV{DDProf_ROOT})
|
6
|
-
set(DDProf_ROOT "$ENV{DDProf_ROOT}")
|
7
|
-
else ()
|
8
|
-
# If the environment variable is not set, maybe we are part of a build
|
9
|
-
set(DDProf_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
10
|
-
endif ()
|
11
|
-
|
12
|
-
find_path(DDProf_INCLUDE_DIR ddprof/ffi.h
|
13
|
-
HINTS ${DDProf_ROOT}/include
|
14
|
-
)
|
15
|
-
|
16
|
-
find_library(DDProf_FFI_LIBRARY NAMES ddprof_ffi
|
17
|
-
HINTS ${DDProf_ROOT}/lib
|
18
|
-
)
|
19
|
-
|
20
|
-
find_package_handle_standard_args(DDProf DEFAULT_MSG
|
21
|
-
DDProf_FFI_LIBRARY
|
22
|
-
DDProf_INCLUDE_DIR
|
23
|
-
)
|
24
|
-
|
25
|
-
if (DDProf_FOUND)
|
26
|
-
set(DDProf_INCLUDE_DIRS ${DDProf_INCLUDE_DIR})
|
27
|
-
set(DDProf_LIBRARIES ${DDProf_FFI_LIBRARY} -ldl -lrt -lpthread -lc -lm -lrt -lpthread -lutil -ldl -lutil)
|
28
|
-
mark_as_advanced(
|
29
|
-
DDProf_ROOT
|
30
|
-
DDProf_FFI_LIBRARY
|
31
|
-
DDProf_INCLUDE_DIR
|
32
|
-
)
|
33
|
-
|
34
|
-
add_library(ddprof-ffi INTERFACE)
|
35
|
-
target_include_directories(ddprof-ffi INTERFACE ${DDProf_INCLUDE_DIRS})
|
36
|
-
target_link_libraries(ddprof-ffi INTERFACE ${DDProf_LIBRARIES})
|
37
|
-
target_compile_features(ddprof-ffi INTERFACE c_std_11)
|
38
|
-
add_library(DDProf::FFI ALIAS ddprof-ffi)
|
39
|
-
else ()
|
40
|
-
set(DDProf_ROOT "" CACHE STRING "Directory containing libddprof")
|
41
|
-
endif ()
|
data/vendor/libddprof-0.2.0/x86_64-linux/libddprof-x86_64-unknown-linux-gnu/lib/libddprof_ffi.a
DELETED
Binary file
|
@@ -1,41 +0,0 @@
|
|
1
|
-
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
|
2
|
-
# This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021-Present Datadog, Inc.
|
3
|
-
include(FindPackageHandleStandardArgs)
|
4
|
-
|
5
|
-
if (DEFINED ENV{DDProf_ROOT})
|
6
|
-
set(DDProf_ROOT "$ENV{DDProf_ROOT}")
|
7
|
-
else ()
|
8
|
-
# If the environment variable is not set, maybe we are part of a build
|
9
|
-
set(DDProf_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
10
|
-
endif ()
|
11
|
-
|
12
|
-
find_path(DDProf_INCLUDE_DIR ddprof/ffi.h
|
13
|
-
HINTS ${DDProf_ROOT}/include
|
14
|
-
)
|
15
|
-
|
16
|
-
find_library(DDProf_FFI_LIBRARY NAMES ddprof_ffi
|
17
|
-
HINTS ${DDProf_ROOT}/lib
|
18
|
-
)
|
19
|
-
|
20
|
-
find_package_handle_standard_args(DDProf DEFAULT_MSG
|
21
|
-
DDProf_FFI_LIBRARY
|
22
|
-
DDProf_INCLUDE_DIR
|
23
|
-
)
|
24
|
-
|
25
|
-
if (DDProf_FOUND)
|
26
|
-
set(DDProf_INCLUDE_DIRS ${DDProf_INCLUDE_DIR})
|
27
|
-
set(DDProf_LIBRARIES ${DDProf_FFI_LIBRARY} -lssp_nonshared -lc)
|
28
|
-
mark_as_advanced(
|
29
|
-
DDProf_ROOT
|
30
|
-
DDProf_FFI_LIBRARY
|
31
|
-
DDProf_INCLUDE_DIR
|
32
|
-
)
|
33
|
-
|
34
|
-
add_library(ddprof-ffi INTERFACE)
|
35
|
-
target_include_directories(ddprof-ffi INTERFACE ${DDProf_INCLUDE_DIRS})
|
36
|
-
target_link_libraries(ddprof-ffi INTERFACE ${DDProf_LIBRARIES})
|
37
|
-
target_compile_features(ddprof-ffi INTERFACE c_std_11)
|
38
|
-
add_library(DDProf::FFI ALIAS ddprof-ffi)
|
39
|
-
else ()
|
40
|
-
set(DDProf_ROOT "" CACHE STRING "Directory containing libddprof")
|
41
|
-
endif ()
|