garbageman 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/garbageman.gemspec +1 -1
- data/lib/garbageman/collector.rb +9 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTZlNjU0MTY0YTBkN2RlMDBmNTdjZjdkODY5NjM3OGYwNTFmNTZmOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODE3Mzc0YTI1YzgyNzcyYjE2NmRjMDk1NTI3NjQzNGMzNzZkMmE0Mw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDU3OGNiMmM2Y2ZkZTE5NDNmMzhmOWM4NmJjMjY1ZmYxOGVmZDRkNjM2YzEx
|
10
|
+
NDhjMWU5OGY5NzhiMTVmMmFlYmZhNjg1MDM1MzM0OTg0OTM1OWM5OTY1MjM5
|
11
|
+
ZjJiZDY0MWFkYjEyNWU0MTAzZGUxNWY0ZGY5ODU5M2I2N2NiMmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjkwNzcyYzZkYjZjNTE2NTNhNDVlMDA5N2U3MjU3YjAwYmY4MWI1NzljOWQ3
|
14
|
+
Mjc5ZTM0NzY1MTA2MDE3MzI4NzBmYzc5YjdiZjQwNDE0NjAwZjM5OTZlODcw
|
15
|
+
MjBjNzIzZDRmMzk1MjZjYTQ0YWMwNTI2YjEyYzhjZGM1NmE2NWU=
|
data/garbageman.gemspec
CHANGED
data/lib/garbageman/collector.rb
CHANGED
@@ -119,11 +119,15 @@ module GarbageMan
|
|
119
119
|
end
|
120
120
|
|
121
121
|
def process_resident_memory_size_in_kb
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
122
|
+
if File.exists?('/proc/self/statm')
|
123
|
+
File.read('/proc/self/statm').split(' ')[1]
|
124
|
+
else
|
125
|
+
headers, stats = `ps v #{Process.pid}`.split "\n"
|
126
|
+
return 0 unless headers && stats
|
127
|
+
headers = headers.strip.gsub(/ +/, ' ').split(' ')
|
128
|
+
stats = stats.strip.gsub(/ +/, ' ').split(' ')
|
129
|
+
Hash[headers.zip(stats)]['RSS'].to_i
|
130
|
+
end
|
127
131
|
end
|
128
132
|
|
129
133
|
def create_gc_yaml
|