pyroscope 1.0.1 → 1.0.8
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/Gemfile.lock +5 -4
- data/README.md +7 -53
- data/ext/rbspy/Cargo.lock +2743 -0
- data/ext/rbspy/Cargo.toml +7 -12
- data/ext/rbspy/Rakefile +1 -1
- data/ext/rbspy/include/rbspy.h +12 -0
- data/ext/rbspy/src/backend.rs +199 -0
- data/ext/rbspy/src/lib.rs +122 -35
- data/lib/pyroscope/version.rb +1 -1
- data/pyroscope.gemspec +7 -18
- metadata +10 -14
- data/ext/rbspy/build.rs +0 -12
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca2a81993fe33b1c68de81f01eb6472c4b1a45dd89f9630dea90b510fa3b20e2
|
|
4
|
+
data.tar.gz: 8000fa549a55cd2d59128465b62f224947dd8aa7bb5eca2b4690aa2c6a021a1f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 866dbca8110e67e6ec6b64128d731269691e15787ec4dcffbc3cc136a3b7c561b77c13487b1c42c70bf30beecae475026a4c9c89e912fbe93f834522a9774f5e
|
|
7
|
+
data.tar.gz: 227cb21266cfa92803bcb1f70679c834fac326e233e4e62bda4753776fc066f27736eadefe4fffd18c4697f00ed8db60b57092ee81151d6dbc4d3a3a94f6b504
|
data/Gemfile.lock
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
pyroscope (1.0.
|
|
4
|
+
pyroscope (1.0.8)
|
|
5
5
|
ffi
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
ffi (1.
|
|
11
|
-
|
|
10
|
+
ffi (1.17.4)
|
|
11
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
12
|
+
rake (13.3.1)
|
|
12
13
|
|
|
13
14
|
PLATFORMS
|
|
14
15
|
ruby
|
|
@@ -20,4 +21,4 @@ DEPENDENCIES
|
|
|
20
21
|
rake (~> 13.0)
|
|
21
22
|
|
|
22
23
|
BUNDLED WITH
|
|
23
|
-
|
|
24
|
+
4.0.6
|
data/README.md
CHANGED
|
@@ -1,70 +1,24 @@
|
|
|
1
1
|
# Pyroscope Ruby Gem
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Ruby integration for [Pyroscope](https://grafana.com/oss/pyroscope/) continuous profiling platform.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-

|
|
8
|
-
[](https://badge.fury.io/rb/pyroscope)
|
|
5
|
+
## Installation
|
|
9
6
|
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
### What is Pyroscope
|
|
13
|
-
[Pyroscope](https://github.com/pyroscope-io/pyroscope) is a tool that lets you continuously profile your applications to prevent and debug performance issues in your code. It consists of a low-overhead agent which sends data to the Pyroscope server which includes a custom-built storage engine. This allows for you to store and query any applications profiling data in an extremely efficient and cost effective way.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Supported platforms
|
|
17
|
-
|
|
18
|
-
| Linux | macOS | Windows | Docker |
|
|
19
|
-
|:-----:|:-----:|:-------:|:------:|
|
|
20
|
-
| ✅ | ✅ | | ✅ |
|
|
21
|
-
|
|
22
|
-
### Profiling Ruby applications
|
|
23
|
-
|
|
24
|
-
Add the `pyroscope` gem to your Gemfile:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
bundle add pyroscope
|
|
28
7
|
```
|
|
29
|
-
|
|
30
|
-
### Basic Configuration
|
|
31
|
-
|
|
32
|
-
Add the following code to your application. If you're using rails, put this into `config/initializers` directory. This code will initialize pyroscope profiler and start profiling:
|
|
33
|
-
|
|
34
|
-
```ruby
|
|
35
|
-
require 'pyroscope'
|
|
36
|
-
|
|
37
|
-
Pyroscope.configure do |config|
|
|
38
|
-
config.application_name = "my.ruby.app" # replace this with some name for your application
|
|
39
|
-
config.server_address = "http://my-pyroscope-server:4040" # replace this with the address of your pyroscope server
|
|
40
|
-
end
|
|
8
|
+
gem install pyroscope
|
|
41
9
|
```
|
|
42
10
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Pyroscope ruby integration provides a number of ways to tag profiling data. For example, you can provide tags when you're initializing the profiler:
|
|
11
|
+
## Usage
|
|
46
12
|
|
|
47
13
|
```ruby
|
|
48
14
|
require 'pyroscope'
|
|
49
15
|
|
|
50
16
|
Pyroscope.configure do |config|
|
|
51
17
|
config.application_name = "my.ruby.app"
|
|
52
|
-
config.server_address
|
|
53
|
-
|
|
54
|
-
config.tags = {
|
|
55
|
-
"hostname" => ENV["HOSTNAME"],
|
|
56
|
-
}
|
|
57
|
-
end
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
or you can dynamically tag certain parts of your code:
|
|
61
|
-
|
|
62
|
-
```ruby
|
|
63
|
-
Pyroscope.tag_wrapper({ "controller": "slow_controller_i_want_to_profile" }) do
|
|
64
|
-
slow_code
|
|
18
|
+
config.server_address = "http://localhost:4040"
|
|
65
19
|
end
|
|
66
20
|
```
|
|
67
21
|
|
|
68
|
-
|
|
22
|
+
## License
|
|
69
23
|
|
|
70
|
-
|
|
24
|
+
Apache-2.0
|