gvl-tracing 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +7 -9
- data/lib/gvl-tracing.rb +8 -0
- data/lib/gvl_tracing/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5ec59682543834d531647bea2601457de0d8f8d57fe039181375891ef29ae60
|
4
|
+
data.tar.gz: ebfa80876458868eb9780bdf655c75ff7c3b649f0661799533e6dcd12f5b06ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 259ae5c91f2d750ed61ec938a3eb3f92fc813391393420648288626d824408f1678a534de2185c73a6ea8fc2a695aa46135f5529a8fa9bd32e00c0f878b5a538
|
7
|
+
data.tar.gz: ead5ce15933a39684675705a60983dbcd5fc8afb7752822103799261d05d5e3b3f6da8562ca496b9929f7bebf9ed203c31ccc5b778be59bf2c724f7bab9c4d49
|
data/README.adoc
CHANGED
@@ -25,17 +25,15 @@ def fib(n)
|
|
25
25
|
fib(n - 1) + fib(n - 2)
|
26
26
|
end
|
27
27
|
|
28
|
-
GvlTracing.start("example1.json")
|
28
|
+
GvlTracing.start("example1.json") do
|
29
|
+
Thread.new { sleep(0.05) while true }
|
29
30
|
|
30
|
-
|
31
|
+
sleep(0.05)
|
31
32
|
|
32
|
-
|
33
|
+
3.times.map { Thread.new { fib(37) } }.map(&:join)
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
sleep(0.05)
|
37
|
-
|
38
|
-
GvlTracing.stop
|
35
|
+
sleep(0.05)
|
36
|
+
end
|
39
37
|
----
|
40
38
|
|
41
39
|
To do so:
|
@@ -65,7 +63,7 @@ Use `require "gvl-tracing"` to load the gem.
|
|
65
63
|
|
66
64
|
This gem only provides a single module (`GvlTracing`) with methods:
|
67
65
|
|
68
|
-
* `start(filename)`: Starts tracing, writing the results to the provided filename
|
66
|
+
* `start(filename, &block)`: Starts tracing, writing the results to the provided filename. When a block is passed, yields the block and calls stop.
|
69
67
|
* `stop`: Stops tracing
|
70
68
|
|
71
69
|
The resulting traces can be analyzed by going to https://ui.perfetto.dev/[Perfetto UI].
|
data/lib/gvl-tracing.rb
CHANGED
data/lib/gvl_tracing/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gvl-tracing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivo Anjo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -52,7 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
|
-
rubygems_version: 3.4.
|
55
|
+
rubygems_version: 3.4.1
|
56
56
|
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Get a timeline view of Global VM Lock usage in your Ruby app
|