sys-proctable 1.2.3 → 1.2.4

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: e3404d47e900afa6fdc2927ac2cbaacf28e1c9b528a8ae1c2f7e771aad1c9f08
4
- data.tar.gz: d7a945bb1cb8462b725468cc6f46dc006e4e38b8e30cfb3d83dd4e216ef4a91f
3
+ metadata.gz: 8c36a4455aa4fd0172d51e7e1e69b69c180a86da3570247c6958c2bdee34a314
4
+ data.tar.gz: 2659ffc977988520db6d68703efa079815d966fd0320679c8cc961a75daf3f13
5
5
  SHA512:
6
- metadata.gz: f158d93813d080b3af3ff803254bfd422612aca534ca20b6c2ed3d67b828aa261987b0555fdc774394534d5f1d68f05ab198cab1ab4ae19a81f65c930473a301
7
- data.tar.gz: b2f462f65aa275b83652f82a5d190579ca516b768269f78655690b0fdc87ea9f9ca7ab1155597c727a8daa7b1483d5846678dbedeb7d5c5a5c2ecda880d42940
6
+ metadata.gz: d2a101a16b5c3a767917fc2f4e32633f20785a9d678c46f6def07aabc3d5392238bfe8b48a73f203f607a161c1908f0e412e73f5b2a6c92a56c16c8e65c72594
7
+ data.tar.gz: c372c2763018d53376e11aaaa8004071eff144dfd3830c1fb15dbfcc4f35316a2870b1519d0a77613a3465e31bcca0da9f0397dba0c1bfaf1e0e9b0649029a04
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ == 1.2.4 - 18-Jun-2020
2
+ * Added the num_threads field for Linux. This was originally a dead field in
3
+ older versions of Linux that was skipped, but as of Linux 2.6+ it actually
4
+ holds meaningful data.
5
+ * Updated the specs for Linux.
6
+
1
7
  == 1.2.3 - 17-Mar-2020
2
8
  * Properly include a copy of Apache-2.0 in LICENSE file as part of library.
3
9
  * Add explicit .rdoc extensions to CHANGES and MANIFEST files.
@@ -45,6 +45,7 @@ module Sys
45
45
  'cstime', # Number of children's kernel mode jiffies
46
46
  'priority', # Nice value plus 15
47
47
  'nice', # Nice value
48
+ 'num_threads', # Number of threads in this process
48
49
  'itrealvalue', # Time in jiffies before next SIGALRM
49
50
  'starttime', # Time in jiffies since system boot
50
51
  'vsize', # Virtual memory size in bytes
@@ -216,7 +217,7 @@ module Sys
216
217
  struct.cstime = stat[16].to_i
217
218
  struct.priority = stat[17].to_i
218
219
  struct.nice = stat[18].to_i
219
- # Skip 19
220
+ struct.num_threads = stat[19].to_i
220
221
  struct.itrealvalue = stat[20].to_i
221
222
  struct.starttime = stat[21].to_i
222
223
  struct.vsize = stat[22].to_i
@@ -1,6 +1,6 @@
1
1
  module Sys
2
2
  class ProcTable
3
3
  # The version of the sys-proctable library
4
- VERSION = '1.2.3'.freeze
4
+ VERSION = '1.2.4'.freeze
5
5
  end
6
6
  end
@@ -16,7 +16,8 @@ describe Sys::ProcTable do
16
16
  end
17
17
 
18
18
  it "has a VERSION constant set to the expected value" do
19
- expect(Sys::ProcTable::VERSION).to eql('1.2.3')
19
+ expect(Sys::ProcTable::VERSION).to eql('1.2.4')
20
+ expect(Sys::ProcTable::VERSION).to be_frozen
20
21
  end
21
22
 
22
23
  it "defines a custom error class" do
@@ -10,12 +10,12 @@ require_relative 'sys_proctable_all_spec'
10
10
 
11
11
  describe Sys::ProcTable do
12
12
  let(:fields){ %w[
13
- cmdline cwd exe pid name uid euid gid egid comm state ppid pgrp
14
- session tty_num tpgid flags minflt cminflt majflt cmajflt utime
15
- stime cutime cstime priority nice itrealvalue starttime vsize
13
+ cmdline cwd environ exe fd root pid name uid euid gid egid comm state ppid pgrp
14
+ session tty_nr tpgid flags minflt cminflt majflt cmajflt utime
15
+ stime cutime cstime priority nice num_threads itrealvalue starttime vsize
16
16
  rss rlim startcode endcode startstack kstkesp kstkeip signal blocked
17
- sigignore sigcatch wchan nswap cnswap exit_signal processor environ
18
- pctcpu pctmem nlwp cgroup smaps
17
+ sigignore sigcatch wchan nswap cnswap exit_signal processor rt_priority
18
+ policy pctcpu pctmem nlwp cgroup smaps
19
19
  ]
20
20
  }
21
21
 
@@ -147,6 +147,11 @@ describe Sys::ProcTable do
147
147
  expect(subject.nice).to be_kind_of(Numeric)
148
148
  end
149
149
 
150
+ it "contains a num_threads member and returns the expected value" do
151
+ expect(subject).to respond_to(:num_threads)
152
+ expect(subject.num_threads).to be_kind_of(Numeric)
153
+ end
154
+
150
155
  it "contains a itrealvalue member and returns the expected value" do
151
156
  expect(subject).to respond_to(:itrealvalue)
152
157
  expect(subject.itrealvalue).to be_kind_of(Numeric)
@@ -307,4 +312,12 @@ describe Sys::ProcTable do
307
312
  expect(subject.smaps).to be_kind_of(Sys::ProcTable::Smaps)
308
313
  end
309
314
  end
315
+
316
+ context "fields" do
317
+ it "has a fields method that returns the expected results" do
318
+ expect(described_class).to respond_to(:fields)
319
+ expect(described_class.fields).to be_kind_of(Array)
320
+ expect(described_class.fields).to match_array(fields)
321
+ end
322
+ end
310
323
  end
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'sys-proctable'
5
- spec.version = '1.2.3'
5
+ spec.version = '1.2.4'
6
6
  spec.author = 'Daniel J. Berger'
7
7
  spec.license = 'Apache-2.0'
8
8
  spec.email = 'djberg96@gmail.com'
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.metadata = {
33
33
  'homepage_uri' => 'https://github.com/djberg96/sys-proctable',
34
34
  'bug_tracker_uri' => 'https://github.com/djberg96/sys-proctable/issues',
35
- 'changelog_uri' => 'https://github.com/djberg96/sys-proctable/blob/master/CHANGES',
35
+ 'changelog_uri' => 'https://github.com/djberg96/sys-proctable/blob/master/CHANGES.rdoc',
36
36
  'documentation_uri' => 'https://github.com/djberg96/sys-proctable/wiki',
37
37
  'source_code_uri' => 'https://github.com/djberg96/sys-proctable',
38
38
  'wiki_uri' => 'https://github.com/djberg96/sys-proctable/wiki'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sys-proctable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel J. Berger
@@ -121,7 +121,7 @@ licenses:
121
121
  metadata:
122
122
  homepage_uri: https://github.com/djberg96/sys-proctable
123
123
  bug_tracker_uri: https://github.com/djberg96/sys-proctable/issues
124
- changelog_uri: https://github.com/djberg96/sys-proctable/blob/master/CHANGES
124
+ changelog_uri: https://github.com/djberg96/sys-proctable/blob/master/CHANGES.rdoc
125
125
  documentation_uri: https://github.com/djberg96/sys-proctable/wiki
126
126
  source_code_uri: https://github.com/djberg96/sys-proctable
127
127
  wiki_uri: https://github.com/djberg96/sys-proctable/wiki
metadata.gz.sig CHANGED
Binary file