process-metrics 0.10.0 → 0.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb30f9e1ffed610ad4a6735a8875f6438eae603ce53e6cb67274e7f893f1c4d5
4
- data.tar.gz: 0474ced532e19377ee8b4b7003c21d1a098afc8df5fb3f9865ea163aa756eced
3
+ metadata.gz: 9ba73a437e475ddef14fcc6359ccda80005af948d51f8ee16948483745e31808
4
+ data.tar.gz: 91cdd79dda0ec324cb537e4e7f507a858b79cd0fe3adb67b7d216176557eb2ff
5
5
  SHA512:
6
- metadata.gz: 898911e287967bb88596747da31bc6e956bdf4aa8bdea23b461df7998922155d72bd577ca0092320514aa41738547576abd379779a89cf66a22d5a63f0e279f8
7
- data.tar.gz: 0f78a3b25a090f9823feae392358281e10f1828a0cb4d324ad880a0a877e0ae34d8cd9d4fbedf7018fe847b5dff1b2f2c6a27702eebb61d714afb46faf4eda7a
6
+ metadata.gz: 31588e588c2f4dd68a44072876e2dee6fa22a04226c23e937020ee4055a433bc5b90f8e90c016c470d00a44b50fc7d63d951c04566baba103247a2ed0c67f194
7
+ data.tar.gz: 6b14d2d59122a4b7ef6df058102e7631623e6abe3f8be0f743c0653e31f44e0436f269b43aa3cc398c4bcd562cd7572ba867f5a33abf72c1ca186999392d7be3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -8,12 +8,12 @@ module Process
8
8
  # Per-host (system-wide) memory metrics. Use Host::Memory for total/used/free and swap; use Process::Metrics::Memory for per-process metrics.
9
9
  module Host
10
10
  # Struct for host memory snapshot. All sizes in bytes.
11
- # @attribute total [Integer] Total memory (cgroup limit when in a container, else physical RAM).
12
- # @attribute used [Integer] Memory in use (total - free).
13
- # @attribute free [Integer] Available memory (MemAvailable-style: free + reclaimable).
14
- # @attribute swap_total [Integer, nil] Total swap, or nil if not available.
15
- # @attribute swap_used [Integer, nil] Swap in use, or nil if not available.
16
- Memory = Struct.new(:total, :used, :free, :swap_total, :swap_used) do
11
+ # @attribute total_size [Integer] Total memory (cgroup limit when in a container, else physical RAM).
12
+ # @attribute used_size [Integer] Memory in use (total_size - free_size).
13
+ # @attribute free_size [Integer] Available memory (MemAvailable-style: free + reclaimable).
14
+ # @attribute swap_total_size [Integer, nil] Total swap, or nil if not available.
15
+ # @attribute swap_used_size [Integer, nil] Swap in use, or nil if not available.
16
+ Memory = Struct.new(:total_size, :used_size, :free_size, :swap_total_size, :swap_used_size) do
17
17
  alias as_json to_h
18
18
 
19
19
  def to_json(*arguments)
@@ -37,7 +37,7 @@ module Process
37
37
  # Total system/host memory in bytes. Delegates to Host::Memory.capture.
38
38
  # @returns [Integer | Nil]
39
39
  def self.total_size
40
- Host::Memory.capture&.total
40
+ Host::Memory.capture&.total_size
41
41
  end
42
42
 
43
43
  # Whether the memory usage can be captured on this system.
@@ -7,6 +7,6 @@
7
7
  module Process
8
8
  # @namespace
9
9
  module Metrics
10
- VERSION = "0.10.0"
10
+ VERSION = "0.10.1"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -16,9 +16,13 @@ Please see the [project documentation](https://socketry.github.io/process-metric
16
16
 
17
17
  Please see the [project releases](https://socketry.github.io/process-metrics/releases/index) for all releases.
18
18
 
19
+ ### v0.10.1
20
+
21
+ - Consistent use of `_size` suffix.
22
+
19
23
  ### v0.10.0
20
24
 
21
- - **Host::Memory**: New per-host struct `Process::Metrics::Host::Memory` with `total`, `used`, `free`, `swap_total`, `swap_used` (all bytes). Use `Host::Memory.capture` to get a snapshot; `.supported?` indicates platform support.
25
+ - **Host::Memory**: New per-host struct `Process::Metrics::Host::Memory` with `total_size`, `used_size`, `free_size`, `swap_total_size`, `swap_used_size` (all bytes). Use `Host::Memory.capture` to get a snapshot; `.supported?` indicates platform support.
22
26
 
23
27
  ### v0.9.0
24
28
 
@@ -60,17 +64,6 @@ Please see the [project releases](https://socketry.github.io/process-metrics/rel
60
64
  - Modernized codebase to use current Ruby conventions.
61
65
  - Improved Darwin (macOS) support with better platform-specific handling.
62
66
 
63
- ### v0.3.0
64
-
65
- - Added support for `smaps_rollup` on Linux for more efficient memory statistics collection.
66
- - Fixed `smaps_rollup` detection (corrected file path).
67
- - Removed `sz` metric (not supported on Darwin).
68
- - Expanded test coverage.
69
- - Improved documentation with better syntax highlighting and fixed links.
70
- - Avoided abbreviations in naming conventions for better code clarity.
71
- - Added missing dependencies: `bake-test-external` and `json` gem.
72
- - Added summary lines for PSS (Proportional Set Size) and USS (Unique Set Size).
73
-
74
67
  ## Contributing
75
68
 
76
69
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Releases
2
2
 
3
+ ## v0.10.1
4
+
5
+ - Consistent use of `_size` suffix.
6
+
3
7
  ## v0.10.0
4
8
 
5
- - **Host::Memory**: New per-host struct `Process::Metrics::Host::Memory` with `total`, `used`, `free`, `swap_total`, `swap_used` (all bytes). Use `Host::Memory.capture` to get a snapshot; `.supported?` indicates platform support.
9
+ - **Host::Memory**: New per-host struct `Process::Metrics::Host::Memory` with `total_size`, `used_size`, `free_size`, `swap_total_size`, `swap_used_size` (all bytes). Use `Host::Memory.capture` to get a snapshot; `.supported?` indicates platform support.
6
10
 
7
11
  ## v0.9.0
8
12
 
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- r��4��� ����ˣbN_�䅠E��{hl]Y�XV2��I{�
2
- Ԛ�2fq�l�cp�/i.��8Dh�sQ�e�N,dr � n£�_���=,�u�%��;/�0-�Dm%F�-�@��D�H�+�͈}1�#S���+������S �A� ���=4��j���� �e��a�8��9ڟ-�f��;��mbvQ��q
1
+ [D�7/���wT�`��@$#�E�C����T
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file