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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yjk5NjhlMWEyOWE1M2M5ZGQ1ZGQwOGM5MzY5NGNkNTQxMmMyNmY4Yw==
4
+ MTZlNjU0MTY0YTBkN2RlMDBmNTdjZjdkODY5NjM3OGYwNTFmNTZmOQ==
5
5
  data.tar.gz: !binary |-
6
- ZGQzY2QyMDNlYzZhNDk4YTI0MmI1MmZjYzQ5MTZmMmVkNmQ5ZjM4Mg==
6
+ ODE3Mzc0YTI1YzgyNzcyYjE2NmRjMDk1NTI3NjQzNGMzNzZkMmE0Mw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmYxYzdlNDI3MWU4NTJhZjc4YzA3MTkwZjc0MTdlYTQ1ZTE5YzQwNjEwZmE5
10
- MmY0N2QxYzVhODVmZDFlZDU4MDhlN2RhOTgzYTVlODQ2YzdlZWRhODllYzBh
11
- NmEzMjlmODMyMDQxNTgzNGU4MGJkM2Q5N2E4MDA5YmMwYzg4ZjU=
9
+ MDU3OGNiMmM2Y2ZkZTE5NDNmMzhmOWM4NmJjMjY1ZmYxOGVmZDRkNjM2YzEx
10
+ NDhjMWU5OGY5NzhiMTVmMmFlYmZhNjg1MDM1MzM0OTg0OTM1OWM5OTY1MjM5
11
+ ZjJiZDY0MWFkYjEyNWU0MTAzZGUxNWY0ZGY5ODU5M2I2N2NiMmQ=
12
12
  data.tar.gz: !binary |-
13
- YWZmMDIxNjk0NjFiNzdlN2I5M2EwODFlMDg1NzU1ODJlMTdmMDFkOGJhMmRj
14
- ODBkYjEzNjdkMzM5NDAxYzJhMDIwMjU5ODE3MTIyNzkwZDNlZDY3ZDc4MGU5
15
- MTgwYzA1MDBhMWQ0OTM2Njc0MTVlNzg3MGUwNjk0OTI3NTAzMzQ=
13
+ ZjkwNzcyYzZkYjZjNTE2NTNhNDVlMDA5N2U3MjU3YjAwYmY4MWI1NzljOWQ3
14
+ Mjc5ZTM0NzY1MTA2MDE3MzI4NzBmYzc5YjdiZjQwNDE0NjAwZjM5OTZlODcw
15
+ MjBjNzIzZDRmMzk1MjZjYTQ0YWMwNTI2YjEyYzhjZGM1NmE2NWU=
data/garbageman.gemspec CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "garbageman"
9
- s.version = "0.3.2"
9
+ s.version = "0.3.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -119,11 +119,15 @@ module GarbageMan
119
119
  end
120
120
 
121
121
  def process_resident_memory_size_in_kb
122
- headers, stats = `ps v #{Process.pid}`.split "\n"
123
- return 0 unless headers && stats
124
- headers = headers.strip.gsub(/ +/, ' ').split(' ')
125
- stats = stats.strip.gsub(/ +/, ' ').split(' ')
126
- Hash[headers.zip(stats)]['RSS'].to_i
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garbageman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch