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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/process/metrics/host/memory.rb +6 -6
- data/lib/process/metrics/memory.rb +1 -1
- data/lib/process/metrics/version.rb +1 -1
- data/readme.md +5 -12
- data/releases.md +5 -1
- data.tar.gz.sig +1 -2
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ba73a437e475ddef14fcc6359ccda80005af948d51f8ee16948483745e31808
|
|
4
|
+
data.tar.gz: 91cdd79dda0ec324cb537e4e7f507a858b79cd0fe3adb67b7d216176557eb2ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
12
|
-
# @attribute
|
|
13
|
-
# @attribute
|
|
14
|
-
# @attribute
|
|
15
|
-
# @attribute
|
|
16
|
-
Memory = Struct.new(:
|
|
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&.
|
|
40
|
+
Host::Memory.capture&.total_size
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
# Whether the memory usage can be captured on this system.
|
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 `
|
|
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 `
|
|
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
|
-
|
|
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
metadata.gz.sig
CHANGED
|
Binary file
|