get_process_mem 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/get_process_mem.rb +1 -1
- data/lib/get_process_mem/version.rb +1 -1
- data/test/get_process_mem_test.rb +10 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bb77afa418ea02d1e7d7416d88fc9706de5c581c84aa22d3199c405e406404e
|
4
|
+
data.tar.gz: 1ee05474ce71701a823828452ee0d657422f790aafc8a0cdd7b2259843af4f0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d70576115a29294f6e0bf456f5992b9f1aa208d1c0855ccf15492c93824ac602c8911bca6b819723d4f2a1faeb25828afe453ff5c1f3bb3715e632eae7b339e7
|
7
|
+
data.tar.gz: cd0c1482f61ef34933cbe87afcbf281debd359b6f37e476dc765196b791c61fa768aab5f9a5f0eb98df0026ac174d3036633bce4135e5e7c650ff40f23d259a3
|
data/CHANGELOG.md
CHANGED
data/lib/get_process_mem.rb
CHANGED
@@ -1,11 +1,20 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class GetProcessMemTest < Test::Unit::TestCase
|
4
|
-
|
5
4
|
def setup
|
6
5
|
@mem = GetProcessMem.new
|
7
6
|
end
|
8
7
|
|
8
|
+
def test_different_pid_returns_different_memory
|
9
|
+
pid = Process.spawn("tail -f Gemfile")
|
10
|
+
|
11
|
+
other_mem = GetProcessMem.new(pid)
|
12
|
+
assert @mem.kb > other_mem.kb
|
13
|
+
ensure
|
14
|
+
Process.kill('TERM', pid) if pid
|
15
|
+
Process.wait(pid) if pid
|
16
|
+
end
|
17
|
+
|
9
18
|
def test_seems_to_work
|
10
19
|
assert @mem.kb > 0
|
11
20
|
assert @mem.mb > 0
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get_process_mem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -93,7 +93,7 @@ homepage: https://github.com/schneems/get_process_mem
|
|
93
93
|
licenses:
|
94
94
|
- MIT
|
95
95
|
metadata: {}
|
96
|
-
post_install_message:
|
96
|
+
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
99
99
|
- lib
|
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
112
|
-
signing_key:
|
111
|
+
rubygems_version: 3.1.2
|
112
|
+
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Use GetProcessMem to find out the amount of RAM used by any process
|
115
115
|
test_files:
|