yabeda-gc 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41440f8b8e9270c11b5de5a69bf697c7b3b169e479e2ac0c0d1066f6bd22a319
4
- data.tar.gz: 99f2c9626351d75e0480e908bdfcc452e2395d7a4f565b00208d1f2e1b274a81
3
+ metadata.gz: c337d68cc03ab7eee36fee5099064219db6813a34dc6d27a1d081f61bdcabcc3
4
+ data.tar.gz: a92f805c82d86f1e9025e96cb5e59bc05df81d9a52b51d563267b6a290d23bc9
5
5
  SHA512:
6
- metadata.gz: a9e49962237a4965a40c1cb273214384b160a16e4bfb35a19fb8b7e34df0e02b59f07cf7fb9f3b6b1177dee50eda9594ff12e33997eee54721ec21f3115c8fae
7
- data.tar.gz: 308c3b0928ee56dbfb8bcc0657de45af7a2ff5d4284357533cfd475f16c7ebaefa5fbb72271ceb25a77bd3a8719667b155ca26d6467cc5ada5435ef2844b533a
6
+ metadata.gz: b0a27895b91e36e5c276c531df511c76a885212eee6657613fb2c2e99031560c9fa5df4926156f8c1d9cb0183a9d38873c169ebfdae9c9004ba692e1093b815e
7
+ data.tar.gz: 8b0f9d5ac117b8e293a155ca4627116493bc020d591c4a7c748e76086acf84d0d1c7b91348f1d0a203368811fe04697f44047ed2131e582ed405a5b6e4feef88
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  AllCops:
3
- TargetRubyVersion: 2.4
3
+ TargetRubyVersion: 2.7
4
4
  NewCops: enable
5
5
 
6
6
  Style/StringLiterals:
data/Gemfile CHANGED
@@ -2,13 +2,9 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- # Specify your gem's dependencies in yabeda-gc.gemspec
6
5
  gemspec
7
6
 
7
+ gem "pry", "~> 0.14"
8
8
  gem "rake", "~> 13.0"
9
-
10
- gem "rspec", "~> 3.0"
11
-
12
- gem "rubocop", "~> 1.7"
13
-
14
- gem "pry"
9
+ gem "rspec", "~> 3.11"
10
+ gem "rubocop", "~> 1.30"
data/Gemfile.lock CHANGED
@@ -1,66 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yabeda-gc (0.1.1)
4
+ yabeda-gc (0.2.0)
5
5
  yabeda (~> 0.6)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
+ anyway_config (2.3.0)
11
+ ruby-next-core (>= 0.14.0)
10
12
  ast (2.4.2)
11
13
  coderay (1.1.3)
12
- concurrent-ruby (1.1.8)
13
- diff-lcs (1.4.4)
14
- dry-initializer (3.0.4)
14
+ concurrent-ruby (1.1.10)
15
+ diff-lcs (1.5.0)
16
+ dry-initializer (3.1.1)
15
17
  method_source (1.0.0)
16
- parallel (1.20.1)
17
- parser (3.0.0.0)
18
+ parallel (1.22.1)
19
+ parser (3.1.2.0)
18
20
  ast (~> 2.4.1)
19
21
  pry (0.14.0)
20
22
  coderay (~> 1.1)
21
23
  method_source (~> 1.0)
22
- rainbow (3.0.0)
24
+ rainbow (3.1.1)
23
25
  rake (13.0.3)
24
- regexp_parser (2.1.1)
25
- rexml (3.2.4)
26
- rspec (3.10.0)
27
- rspec-core (~> 3.10.0)
28
- rspec-expectations (~> 3.10.0)
29
- rspec-mocks (~> 3.10.0)
30
- rspec-core (3.10.1)
31
- rspec-support (~> 3.10.0)
32
- rspec-expectations (3.10.1)
26
+ regexp_parser (2.5.0)
27
+ rexml (3.2.5)
28
+ rspec (3.11.0)
29
+ rspec-core (~> 3.11.0)
30
+ rspec-expectations (~> 3.11.0)
31
+ rspec-mocks (~> 3.11.0)
32
+ rspec-core (3.11.0)
33
+ rspec-support (~> 3.11.0)
34
+ rspec-expectations (3.11.0)
33
35
  diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.10.0)
35
- rspec-mocks (3.10.2)
36
+ rspec-support (~> 3.11.0)
37
+ rspec-mocks (3.11.1)
36
38
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.10.0)
38
- rspec-support (3.10.2)
39
- rubocop (1.10.0)
39
+ rspec-support (~> 3.11.0)
40
+ rspec-support (3.11.0)
41
+ rubocop (1.30.1)
40
42
  parallel (~> 1.10)
41
- parser (>= 3.0.0.0)
43
+ parser (>= 3.1.0.0)
42
44
  rainbow (>= 2.2.2, < 4.0)
43
45
  regexp_parser (>= 1.8, < 3.0)
44
- rexml
45
- rubocop-ast (>= 1.2.0, < 2.0)
46
+ rexml (>= 3.2.5, < 4.0)
47
+ rubocop-ast (>= 1.18.0, < 2.0)
46
48
  ruby-progressbar (~> 1.7)
47
49
  unicode-display_width (>= 1.4.0, < 3.0)
48
- rubocop-ast (1.4.1)
49
- parser (>= 2.7.1.5)
50
+ rubocop-ast (1.18.0)
51
+ parser (>= 3.1.1.0)
52
+ ruby-next-core (0.15.1)
50
53
  ruby-progressbar (1.11.0)
51
- unicode-display_width (2.0.0)
52
- yabeda (0.8.0)
54
+ unicode-display_width (2.1.0)
55
+ yabeda (0.11.0)
56
+ anyway_config (>= 1.0, < 3)
53
57
  concurrent-ruby
54
58
  dry-initializer
55
59
 
56
60
  PLATFORMS
61
+ arm64-darwin-21
57
62
  x86_64-linux
58
63
 
59
64
  DEPENDENCIES
60
- pry
65
+ pry (~> 0.14)
61
66
  rake (~> 13.0)
62
- rspec (~> 3.0)
63
- rubocop (~> 1.7)
67
+ rspec (~> 3.11)
68
+ rubocop (~> 1.30)
64
69
  yabeda-gc!
65
70
 
66
71
  BUNDLED WITH
data/README.md CHANGED
@@ -21,8 +21,9 @@ Or install it yourself as:
21
21
  ## Metrics
22
22
 
23
23
  | Metric | Description |
24
- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------- |
24
+ |-------------------------------------------|-----------------------------------------------------------------------------------------------------------|
25
25
  | `count` | Count of all GCs |
26
+ | `time` | The total time spent in garbage collections (ruby 3+) |
26
27
  | `minor_gc_count` | Count of minor GCs |
27
28
  | `major_gc_count` | Count of major GCs |
28
29
  | `heap_allocated_pages` | Total number of pages allocated for the heap |
@@ -48,6 +49,8 @@ Or install it yourself as:
48
49
  | `oldmalloc_increase_bytes` | Total bytes allocated to old objects |
49
50
  | `oldmalloc_increase_bytes_limit` | Bytes limit that will trigger garbage collection of old objects |
50
51
  | `compact_count` | Count of all GC compactions |
52
+ | `read_barrier_faults` | The total number of times the read barrier was triggered during compaction (ruby 3+) |
53
+ | `total_moved_objects` | The total number of objects compaction has moved (ruby 3+) |
51
54
 
52
55
  ## Development
53
56
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module GC
5
- VERSION = "0.1.1"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
data/lib/yabeda/gc.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "yabeda"
4
+ require "yabeda/gc/version"
4
5
 
5
6
  module Yabeda
6
7
  # Yabeda plugin to capture important Ruby GC metrics
@@ -44,6 +45,12 @@ module Yabeda
44
45
  gauge :oldmalloc_increase_bytes_limit, tags: [],
45
46
  comment: "Bytes limit that will trigger garbage collection of old objects"
46
47
 
48
+ if RUBY_VERSION >= "3.0"
49
+ gauge :time, tags: [], comment: "The total time spent in garbage collections"
50
+ gauge :read_barrier_faults, tags: [], comment: "The total number of times the read barrier was triggered during compaction"
51
+ gauge :total_moved_objects, tags: [], comment: "The total number of objects compaction has moved"
52
+ end
53
+
47
54
  collect do
48
55
  stats = ::GC.stat
49
56
 
data/yabeda-gc.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Prometheus exporter for easy collecting of Ruby GC metrics"
13
13
  spec.homepage = "https://github.com/ianks/yabeda-gc"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
18
18
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency "yabeda", "~> 0.6"
27
+ spec.metadata["rubygems_mfa_required"] = "true"
27
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-gc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Ker-Seymer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-24 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yabeda
@@ -50,7 +50,8 @@ files:
50
50
  homepage: https://github.com/ianks/yabeda-gc
51
51
  licenses:
52
52
  - MIT
53
- metadata: {}
53
+ metadata:
54
+ rubygems_mfa_required: 'true'
54
55
  post_install_message:
55
56
  rdoc_options: []
56
57
  require_paths:
@@ -59,14 +60,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
60
  requirements:
60
61
  - - ">="
61
62
  - !ruby/object:Gem::Version
62
- version: 2.4.0
63
+ version: 2.7.0
63
64
  required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  requirements:
65
66
  - - ">="
66
67
  - !ruby/object:Gem::Version
67
68
  version: '0'
68
69
  requirements: []
69
- rubygems_version: 3.0.3
70
+ rubygems_version: 3.3.7
70
71
  signing_key:
71
72
  specification_version: 4
72
73
  summary: Extensible Prometheus exporter for monitoring Ruby gargage collection