pyroscope 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +9 -7
- data/ext/pyroscope/extconf.rb +26 -23
- data/ext/pyroscope/lib/.gitkeep +0 -0
- data/ext/pyroscope/lib/libpyroscope.rbspy.a +0 -0
- data/ext/pyroscope/lib/libpyroscope.rbspy.combo.a +0 -0
- data/lib/pyroscope/version.rb +1 -1
- data/test.rb +9 -9
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 619c59b1c6e494e5e1b4b47889ea9de7eed5c44264ec0bd9f1372ea87c6a94d0
|
4
|
+
data.tar.gz: d4c3632f2ee191e8bb60529bd5699e11100500cc3ca1cbb4d119a183c38e279d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d120335fbe70f9527e4f9eeb3678dd8db7dfac0aefb1e44fb639c499911ddec9370bb91e9f22bd9ecda519cb3fa92e6982dd9eda135e7be9efe3f26042295d
|
7
|
+
data.tar.gz: '09f603d60123a92e983ac22eeefff6468e047edc99f5cffd4278dfa94e51fc837522daa669838430459bf0009f14eef4d31c1aaae8c647b0196bcd4bedeb0cb6'
|
data/Rakefile
CHANGED
@@ -42,14 +42,16 @@ task :build => [:clean, :compile]
|
|
42
42
|
task :default => [:build, :spec]
|
43
43
|
|
44
44
|
task :test do
|
45
|
-
system "rsync -a /home/dmitry/rbspy/ /home/dmitry/pyroscope/third_party/local-clones/rbspy"
|
46
|
-
# system "cd ../pyroscope && DOCKER_BUILDKIT=1 docker build -f Dockerfile.static-libs --output type=local,dest=out ." if RUBY_PLATFORM.include?("linux")
|
47
|
-
system "cd ../pyroscope && rm out/*.a"
|
48
|
-
system "cd ../pyroscope && ENABLED_SPIES=rbspy make build-rust-dependencies"
|
49
|
-
system "cd ../pyroscope && make build-rbspy-static-library"
|
50
|
-
system "cd ../pyroscope && cp third_party/rustdeps/target/x86_64-unknown-linux-gnu/release/librustdeps.a ./out/librustdeps.a"
|
45
|
+
# system "rsync -a /home/dmitry/rbspy/ /home/dmitry/pyroscope/third_party/local-clones/rbspy"
|
46
|
+
# # system "cd ../pyroscope && DOCKER_BUILDKIT=1 docker build -f Dockerfile.static-libs --output type=local,dest=out ." if RUBY_PLATFORM.include?("linux")
|
47
|
+
# system "cd ../pyroscope && rm out/*.a"
|
48
|
+
# system "cd ../pyroscope && ENABLED_SPIES=rbspy make build-rust-dependencies"
|
49
|
+
# system "cd ../pyroscope && make build-rbspy-static-library"
|
50
|
+
# system "cd ../pyroscope && cp third_party/rustdeps/target/x86_64-unknown-linux-gnu/release/librustdeps.a ./out/librustdeps.a"
|
51
|
+
extra_env = "PYROSCOPE_RUBY_LOCAL=1"
|
52
|
+
extra_env = ""
|
51
53
|
|
52
|
-
system "
|
54
|
+
system "#{extra_env} rake build && #{extra_env} sudo -E gem install pkg/pyroscope-#{Pyroscope::VERSION}.gem && sudo -E ruby test.rb"
|
53
55
|
end
|
54
56
|
|
55
57
|
task :test_exec do
|
data/ext/pyroscope/extconf.rb
CHANGED
@@ -9,7 +9,7 @@ HEADER_DIRS = [INCLUDEDIR]
|
|
9
9
|
|
10
10
|
LIB_DIRS = [LIBDIR, File.expand_path(File.join(File.dirname(__FILE__), "lib"))]
|
11
11
|
|
12
|
-
COMMIT = "
|
12
|
+
COMMIT = "a263249"
|
13
13
|
|
14
14
|
# TODO: this is not very accurate, but it works for now
|
15
15
|
OS = RUBY_PLATFORM.include?("darwin") ? "mac" : "linux"
|
@@ -25,32 +25,35 @@ if ENV["PYROSCOPE_RUBY_LOCAL"]
|
|
25
25
|
system "cp #{ENV["HOME"]}/pyroscope/out/librustdeps.a #{File.join(ROOT, "lib/librustdeps.a")}"
|
26
26
|
else
|
27
27
|
Net::HTTP.start("dl.pyroscope.io", 443, :use_ssl => true) do |http|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
28
|
+
["libpyroscope.rbspy.a", "librustdeps.a"].each do |name|
|
29
|
+
url = PREFIX+"/#{name}.gz"
|
30
|
+
req = Net::HTTP::Get.new(url)
|
31
|
+
http.request(req) do |resp|
|
32
|
+
raise "HTTP error: #{resp.code}" unless resp.code == "200"
|
33
|
+
|
34
|
+
r, w = IO.pipe
|
35
|
+
|
36
|
+
t = Thread.new do
|
37
|
+
zreader = Zlib::GzipReader.new(r)
|
38
|
+
File.open(File.join(ROOT, "lib/#{name}"), "wb") do |f|
|
39
|
+
loop do
|
40
|
+
begin
|
41
|
+
chunk = zreader.readpartial(32768)
|
42
|
+
break if chunk.nil?
|
43
|
+
rescue EOFError
|
44
|
+
break
|
45
|
+
end
|
46
|
+
f.write(chunk)
|
43
47
|
end
|
44
|
-
f.write(chunk)
|
45
48
|
end
|
46
49
|
end
|
47
|
-
end
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
-
|
51
|
+
resp.read_body do |chunk|
|
52
|
+
w.write(chunk)
|
53
|
+
end
|
52
54
|
|
53
|
-
|
55
|
+
t.join
|
56
|
+
end
|
54
57
|
end
|
55
58
|
end
|
56
59
|
end
|
@@ -60,7 +63,7 @@ end
|
|
60
63
|
|
61
64
|
dir_config('pyroscope', HEADER_DIRS, LIB_DIRS)
|
62
65
|
|
63
|
-
libs = ['-lpyroscope.rbspy
|
66
|
+
libs = ['-lpyroscope.rbspy', '-lrustdeps']
|
64
67
|
libs.each do |lib|
|
65
68
|
$LOCAL_LIBS << "#{lib} "
|
66
69
|
end
|
File without changes
|
Binary file
|
Binary file
|
data/lib/pyroscope/version.rb
CHANGED
data/test.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
|
1
|
+
require 'pyroscope'
|
2
2
|
|
3
3
|
puts "prestart #{Process.pid}"
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
Pyroscope.configure do |config|
|
6
|
+
config.app_name = "test.ruby.app{}"
|
7
|
+
config.server_address = "http://localhost:4040/"
|
8
|
+
end
|
9
9
|
|
10
10
|
puts "start"
|
11
11
|
iteration=0
|
@@ -39,13 +39,13 @@ while true
|
|
39
39
|
sleep_job
|
40
40
|
elsif r < 0.5
|
41
41
|
puts(" * test.ruby.app{job=0}")
|
42
|
-
|
42
|
+
Pyroscope.change_name("test.ruby.app{job=0}")
|
43
43
|
job_0
|
44
|
-
|
44
|
+
Pyroscope.change_name("test.ruby.app{}")
|
45
45
|
else
|
46
46
|
puts(" * test.ruby.app{job=1}")
|
47
|
-
|
47
|
+
Pyroscope.change_name("test.ruby.app{job=1}")
|
48
48
|
job_1
|
49
|
-
|
49
|
+
Pyroscope.change_name("test.ruby.app{}")
|
50
50
|
end
|
51
51
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pyroscope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pyroscope Team
|
@@ -94,6 +94,7 @@ files:
|
|
94
94
|
- Rakefile
|
95
95
|
- ext/pyroscope/Makefile.example
|
96
96
|
- ext/pyroscope/extconf.rb
|
97
|
+
- ext/pyroscope/lib/.gitkeep
|
97
98
|
- ext/pyroscope/lib/libpyroscope.rbspy.a
|
98
99
|
- ext/pyroscope/lib/libpyroscope.rbspy.combo.a
|
99
100
|
- ext/pyroscope/lib/librustdeps.a
|