rbbt-util 5.37.0 → 5.37.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 281f115df5158fada081c65b87e292e69e4f378b8353d6e2542b3c45db0c03f1
4
- data.tar.gz: e9801707391c731a2a4b4ead8156cff82fdf30c4e769a8bed34d1d77185b447a
3
+ metadata.gz: 07fa1d0cd31a7eb51d942fdd50e97b1a9740d7412a945e9669fb9261d6bb482c
4
+ data.tar.gz: 3a3ab79e1b42919711c57f9d4c264b910f1f96ecac250062186e525ae5482c2b
5
5
  SHA512:
6
- metadata.gz: 3da2876b28c245b27f32b6dbd00188bdeea498fb118ccab048fb5d72925548e5e89926dea6b6316573e9d95a570c07983109e0e09de92360ec89ab2aec088439
7
- data.tar.gz: 0166d47c3198bfc4c636a1f47ac9be1d2a64b8d97a2836166b02d1ac17d46c2b835ad210953da586f15a98f8593e18f6010ebc07220e95da149dcabec44b33a9
6
+ metadata.gz: 4969b37961d809840e7d047cb6e05d90e6dda0561784afe864e1ab7a10da93e827a1fc6be292960ce8463986ed44fcdf87a95cd0009df498f62cce12e90a4b89
7
+ data.tar.gz: eaf19c896b1317bcf5ca3aa479f6af1a404ba7fb2f17896afd1ea74f3f3410bbf5f3c2608f91c27524748c55911c6e68edf776ebc14abe36ac184a2814314433
@@ -1,5 +1,3 @@
1
- require 'progress-bar'
2
-
3
1
  module TSV
4
2
 
5
3
  attr_accessor :monitor
@@ -397,7 +397,13 @@ def self.add_libdir(dir=nil)
397
397
  end
398
398
  end
399
399
  def self.memory_use(pid=nil)
400
- `ps -o rss -p #{pid || $$}`.strip.split.last.to_i
400
+ pid ||= $$
401
+ begin
402
+ CMD.cmd("grep 'VmRSS:' /proc/#{pid}/status").read.scan(/\d+/).first.to_i
403
+ rescue ProcessFailed
404
+ raise "Process with #{pid} not found"
405
+ end
406
+ #`ps -o rss -p #{pid || $$}`.strip.split.last.to_i
401
407
  end
402
408
 
403
409
 
@@ -1,5 +1,3 @@
1
- require 'net/smtp'
2
-
3
1
  module Misc
4
2
 
5
3
  def self.hostname
@@ -2,7 +2,11 @@ require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_he
2
2
  require 'rbbt/util/misc/development'
3
3
 
4
4
  class TestMiscDevelopment < Test::Unit::TestCase
5
- def test_ssh
5
+ def test_mem
6
+ assert Integer === Misc.memory_use
7
+ end
8
+
9
+ def ___test_ssh
6
10
  Misc.ssh_run 'mn1' do
7
11
  puts "hola"
8
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.37.0
4
+ version: 5.37.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
@@ -122,6 +122,34 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: net
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: nokogiri
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
125
153
  description: Utilities for handling tsv files, caches, etc
126
154
  email: miguel.vazquez.g@bsc.es
127
155
  executables: