sys-proctable 0.7.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +1 -0
- data/CHANGES +165 -0
- data/MANIFEST +33 -41
- data/README +115 -135
- data/Rakefile +94 -0
- data/benchmarks/bench_ps.rb +21 -0
- data/doc/top.txt +5 -11
- data/examples/example_ps.rb +20 -0
- data/lib/aix/sys/proctable.rb +458 -0
- data/lib/darwin/sys/proctable.rb +363 -0
- data/lib/freebsd/sys/proctable.rb +363 -0
- data/lib/linux/sys/proctable.rb +314 -0
- data/lib/linux/sys/proctable/cgroup_entry.rb +50 -0
- data/lib/linux/sys/proctable/smaps.rb +118 -0
- data/lib/sunos/sys/proctable.rb +456 -0
- data/lib/sys-proctable.rb +1 -0
- data/lib/sys-top.rb +1 -0
- data/lib/sys/proctable.rb +18 -0
- data/lib/sys/proctable/version.rb +6 -0
- data/lib/sys/top.rb +28 -19
- data/lib/windows/sys/proctable.rb +208 -0
- data/spec/sys_proctable_aix_spec.rb +328 -0
- data/spec/sys_proctable_all_spec.rb +89 -0
- data/spec/sys_proctable_darwin_spec.rb +120 -0
- data/spec/sys_proctable_freebsd_spec.rb +210 -0
- data/spec/sys_proctable_linux_spec.rb +310 -0
- data/spec/sys_proctable_sunos_spec.rb +316 -0
- data/spec/sys_proctable_windows_spec.rb +317 -0
- data/spec/sys_top_spec.rb +51 -0
- data/sys-proctable.gemspec +38 -0
- metadata +140 -64
- metadata.gz.sig +0 -0
- data/doc/freebsd.txt +0 -90
- data/doc/hpux.txt +0 -77
- data/doc/linux.txt +0 -85
- data/doc/solaris.txt +0 -99
- data/doc/windows.txt +0 -122
- data/ext/extconf.rb +0 -98
- data/ext/sunos/sunos.c +0 -374
- data/ext/sunos/sunos.h +0 -177
- data/ext/version.h +0 -2
- data/test/tc_all.rb +0 -59
- data/test/tc_freebsd.rb +0 -45
- data/test/tc_hpux.rb +0 -49
- data/test/tc_kvm_bsd.rb +0 -31
- data/test/tc_linux.rb +0 -45
- data/test/tc_sunos.rb +0 -52
- data/test/tc_top.rb +0 -26
- data/test/tc_windows.rb +0 -40
- data/test/test_memleak.rb +0 -54
@@ -0,0 +1,316 @@
|
|
1
|
+
#######################################################################
|
2
|
+
# sys_proctable_sunos_spec.rb
|
3
|
+
#
|
4
|
+
# Test suite for sys-proctable for SunOS/Solaris. This should be run
|
5
|
+
# run via the 'rake test' task.
|
6
|
+
#######################################################################
|
7
|
+
require 'rspec'
|
8
|
+
require 'sys/proctable'
|
9
|
+
require_relative 'sys_proctable_all_spec'
|
10
|
+
|
11
|
+
describe Sys::ProcTable do
|
12
|
+
let(:fields){
|
13
|
+
%w[
|
14
|
+
flag nlwp pid ppid pgid sid uid euid gid egid addr size
|
15
|
+
rssize ttydev pctcpu pctmem start time ctime fname psargs
|
16
|
+
wstat argc argv envp dmodel taskid projid nzomb poolid
|
17
|
+
zoneid contract lwpid wchan stype state sname nice syscall
|
18
|
+
pri clname name onpro bindpro bindpset count tstamp create
|
19
|
+
term rtime utime stime ttime tftime dftime kftime ltime
|
20
|
+
slptime wtime stoptime minf majf nswap inblk oublk msnd
|
21
|
+
mrcv sigs vctx ictx sysc ioch path contracts fd cmd_args
|
22
|
+
environ cmdline
|
23
|
+
]
|
24
|
+
}
|
25
|
+
|
26
|
+
context "fields singleton method" do
|
27
|
+
it "responds to a fields method" do
|
28
|
+
expect(described_class).to respond_to(:fields)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "returns the expected results for the fields method" do
|
32
|
+
expect(described_class.fields).to be_kind_of(Array)
|
33
|
+
expect(described_class.fields).to eql(fields)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context "ProcTable::Struct members" do
|
38
|
+
subject { described_class.ps(pid: Process.pid) }
|
39
|
+
|
40
|
+
it "contains a pid member and returns the expected value" do
|
41
|
+
expect(subject).to respond_to(:pid)
|
42
|
+
expect(subject.pid).to be_kind_of(Numeric)
|
43
|
+
expect(subject.pid).to eql(Process.pid)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "contains a ppid member and returns the expected value" do
|
47
|
+
expect(subject).to respond_to(:ppid)
|
48
|
+
expect(subject.ppid).to be_kind_of(Numeric)
|
49
|
+
expect(subject.ppid).to eql(Process.ppid)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "contains a pgid member and returns the expected value" do
|
53
|
+
expect(subject).to respond_to(:pgid)
|
54
|
+
expect(subject.pgid).to be_kind_of(Numeric)
|
55
|
+
expect(subject.pgid).to eql(Process.getpgrp)
|
56
|
+
end
|
57
|
+
|
58
|
+
it "has a flag member that returns the expected value" do
|
59
|
+
expect(subject).to respond_to(:flag)
|
60
|
+
expect(subject.flag).to be_kind_of(Integer)
|
61
|
+
end
|
62
|
+
|
63
|
+
it "has an nlwp member that returns the expected value" do
|
64
|
+
expect(subject).to respond_to(:nlwp)
|
65
|
+
expect(subject.nlwp).to be_kind_of(Integer)
|
66
|
+
expect(subject.nlwp).to be >= 0
|
67
|
+
end
|
68
|
+
|
69
|
+
it "has a sid member that returns the expected value" do
|
70
|
+
expect(subject).to respond_to(:sid)
|
71
|
+
expect(subject.sid).to be_kind_of(Integer)
|
72
|
+
expect(subject.sid).to be >= 0
|
73
|
+
end
|
74
|
+
|
75
|
+
it "has a uid member that returns the expected value" do
|
76
|
+
expect(subject).to respond_to(:uid)
|
77
|
+
expect(subject.uid).to be_kind_of(Integer)
|
78
|
+
expect(subject.uid).to eql(Process.uid)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "has a euid member that returns the expected value" do
|
82
|
+
expect(subject).to respond_to(:euid)
|
83
|
+
expect(subject.euid).to be_kind_of(Integer)
|
84
|
+
expect(subject.euid).to eql(Process.euid)
|
85
|
+
end
|
86
|
+
|
87
|
+
it "has a gid member that returns the expected value" do
|
88
|
+
expect(subject).to respond_to(:gid)
|
89
|
+
expect(subject.gid).to be_kind_of(Integer)
|
90
|
+
expect(subject.gid).to eql(Process.gid)
|
91
|
+
end
|
92
|
+
|
93
|
+
it "has a egid member that returns the expected value" do
|
94
|
+
expect(subject).to respond_to(:egid)
|
95
|
+
expect(subject.egid).to be_kind_of(Integer)
|
96
|
+
expect(subject.egid).to eql(Process.egid)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "has an addr member that returns the expected value" do
|
100
|
+
expect(subject).to respond_to(:addr)
|
101
|
+
expect(subject.addr).to be_kind_of(Integer)
|
102
|
+
expect(subject.addr).to be >= 0
|
103
|
+
end
|
104
|
+
|
105
|
+
it "has a size member that returns the expected value" do
|
106
|
+
expect(subject).to respond_to(:size)
|
107
|
+
expect(subject.size).to be_kind_of(Integer)
|
108
|
+
expect(subject.size).to be >= 0
|
109
|
+
end
|
110
|
+
|
111
|
+
it "has a rssize member that returns the expected value" do
|
112
|
+
expect(subject).to respond_to(:rssize)
|
113
|
+
expect(subject.rssize).to be_kind_of(Integer)
|
114
|
+
expect(subject.rssize).to be >= 0
|
115
|
+
end
|
116
|
+
|
117
|
+
it "has a ttydev member that returns the expected value" do
|
118
|
+
expect(subject).to respond_to(:ttydev)
|
119
|
+
expect(subject.ttydev).to be_kind_of(Integer)
|
120
|
+
expect(subject.ttydev).to be >= -1
|
121
|
+
end
|
122
|
+
|
123
|
+
it "has a pctcpu member that returns the expected value" do
|
124
|
+
expect(subject).to respond_to(:pctcpu)
|
125
|
+
expect(subject.pctcpu).to be_kind_of(Float)
|
126
|
+
expect(subject.pctcpu).to be >= 0.0
|
127
|
+
end
|
128
|
+
|
129
|
+
it "has a pctmem member that returns the expected value" do
|
130
|
+
expect(subject).to respond_to(:pctmem)
|
131
|
+
expect(subject.pctmem).to be_kind_of(Float)
|
132
|
+
expect(subject.pctmem).to be >= 0.0
|
133
|
+
end
|
134
|
+
|
135
|
+
it "has a start member that returns the expected value" do
|
136
|
+
expect(subject).to respond_to(:start)
|
137
|
+
expect(subject.start).to be_kind_of(Time)
|
138
|
+
end
|
139
|
+
|
140
|
+
it "has a time member that returns the expected value" do
|
141
|
+
expect(subject).to respond_to(:time)
|
142
|
+
expect(subject.time).to be_kind_of(Integer)
|
143
|
+
expect(subject.time).to be >= 0
|
144
|
+
end
|
145
|
+
|
146
|
+
it "has a ctime member that returns the expected value" do
|
147
|
+
expect(subject).to respond_to(:ctime)
|
148
|
+
expect(subject.ctime).to be_kind_of(Integer)
|
149
|
+
expect(subject.ctime).to be >= 0
|
150
|
+
end
|
151
|
+
|
152
|
+
it "has a fname member that returns the expected value" do
|
153
|
+
expect(subject).to respond_to(:fname)
|
154
|
+
expect(subject.fname).to be_kind_of(String)
|
155
|
+
expect(subject.fname.size).to be > 0
|
156
|
+
end
|
157
|
+
|
158
|
+
it "has a comm alias member" do
|
159
|
+
expect(subject.method(:comm)).to eql(subject.method(:fname))
|
160
|
+
end
|
161
|
+
|
162
|
+
it "has a psargs member that returns the expected value" do
|
163
|
+
expect(subject).to respond_to(:psargs)
|
164
|
+
expect(subject.psargs).to be_kind_of(String)
|
165
|
+
expect(subject.psargs.size).to be > 0
|
166
|
+
end
|
167
|
+
|
168
|
+
it "has a wstat member that returns the expected value" do
|
169
|
+
expect(subject).to respond_to(:wstat)
|
170
|
+
expect(subject.wstat).to be_kind_of(Integer)
|
171
|
+
expect(subject.wstat).to be >= 0
|
172
|
+
end
|
173
|
+
|
174
|
+
it "has an args member that returns the expected value" do
|
175
|
+
expect(subject).to respond_to(:argc)
|
176
|
+
expect(subject.argc).to be_kind_of(Integer)
|
177
|
+
expect(subject.argc).to be >= 0
|
178
|
+
end
|
179
|
+
|
180
|
+
it "has an argv member that returns the expected value" do
|
181
|
+
expect(subject).to respond_to(:argv)
|
182
|
+
expect(subject.argv).to be_kind_of(Integer)
|
183
|
+
expect(subject.argv).to be >= 0
|
184
|
+
end
|
185
|
+
|
186
|
+
it "has a envp member that returns the expected value" do
|
187
|
+
expect(subject).to respond_to(:envp)
|
188
|
+
expect(subject.envp).to be_kind_of(Integer)
|
189
|
+
expect(subject.envp).to be >= 0
|
190
|
+
end
|
191
|
+
|
192
|
+
it "has a dmodel member that returns the expected value" do
|
193
|
+
expect(subject).to respond_to(:dmodel)
|
194
|
+
expect(subject.dmodel).to be_kind_of(Integer)
|
195
|
+
expect(subject.dmodel).to be >= 0
|
196
|
+
end
|
197
|
+
|
198
|
+
it "has a taskid member that returns the expected value" do
|
199
|
+
expect(subject).to respond_to(:taskid)
|
200
|
+
expect(subject.taskid).to be_kind_of(Integer)
|
201
|
+
expect(subject.taskid).to be >= 0
|
202
|
+
end
|
203
|
+
|
204
|
+
it "has a projid member that returns the expected value" do
|
205
|
+
expect(subject).to respond_to(:projid)
|
206
|
+
expect(subject.projid).to be_kind_of(Integer)
|
207
|
+
expect(subject.projid).to be >= 0
|
208
|
+
end
|
209
|
+
|
210
|
+
it "has a nzomb member that returns the expected value" do
|
211
|
+
expect(subject).to respond_to(:nzomb)
|
212
|
+
expect(subject.nzomb).to be_kind_of(Integer)
|
213
|
+
expect(subject.nzomb).to be >= 0
|
214
|
+
end
|
215
|
+
|
216
|
+
it "has a poolid member that returns the expected value" do
|
217
|
+
expect(subject).to respond_to(:poolid)
|
218
|
+
expect(subject.poolid).to be_kind_of(Integer)
|
219
|
+
expect(subject.poolid).to be >= 0
|
220
|
+
end
|
221
|
+
|
222
|
+
it "has a zoneid member that returns the expected value" do
|
223
|
+
expect(subject).to respond_to(:zoneid)
|
224
|
+
expect(subject.zoneid).to be_kind_of(Integer)
|
225
|
+
expect(subject.zoneid).to be >= 0
|
226
|
+
end
|
227
|
+
|
228
|
+
it "has a contract member that returns the expected value" do
|
229
|
+
expect(subject).to respond_to(:contract)
|
230
|
+
expect(subject.contract).to be_kind_of(Integer)
|
231
|
+
expect(subject.contract).to be >= 0
|
232
|
+
end
|
233
|
+
end
|
234
|
+
|
235
|
+
context "lwpsinfo struct" do
|
236
|
+
subject { described_class.ps(pid: Process.pid) }
|
237
|
+
|
238
|
+
it "has a lwpid member that returns the expected value" do
|
239
|
+
expect(subject).to respond_to(:lwpid)
|
240
|
+
expect(subject.lwpid).to be_kind_of(Integer)
|
241
|
+
expect(subject.lwpid).to be >= 0
|
242
|
+
end
|
243
|
+
|
244
|
+
it "has a wchan member that returns the expected value" do
|
245
|
+
expect(subject).to respond_to(:wchan)
|
246
|
+
expect(subject.wchan).to be_kind_of(Integer)
|
247
|
+
expect(subject.wchan).to be >= 0
|
248
|
+
end
|
249
|
+
|
250
|
+
it "has a stype member that returns the expected value" do
|
251
|
+
expect(subject).to respond_to(:stype)
|
252
|
+
expect(subject.stype).to be_kind_of(Integer)
|
253
|
+
expect(subject.stype).to be >= 0
|
254
|
+
end
|
255
|
+
|
256
|
+
it "has a state member that returns the expected value" do
|
257
|
+
expect(subject).to respond_to(:state)
|
258
|
+
expect(subject.state).to be_kind_of(Fixnum)
|
259
|
+
expect(subject.state).to be >= 0
|
260
|
+
end
|
261
|
+
|
262
|
+
it "has a sname member that returns the expected value" do
|
263
|
+
expect(subject).to respond_to(:sname)
|
264
|
+
expect(subject.sname).to be_kind_of(String)
|
265
|
+
expect(['S','R','Z','T','I','O']).to include(subject.sname)
|
266
|
+
end
|
267
|
+
|
268
|
+
it "has a nice member that returns the expected value" do
|
269
|
+
expect(subject).to respond_to(:nice)
|
270
|
+
expect(subject.nice).to be_kind_of(Fixnum)
|
271
|
+
expect(subject.nice).to be >= 0
|
272
|
+
end
|
273
|
+
|
274
|
+
it "has a syscall member that returns the expected value" do
|
275
|
+
expect(subject).to respond_to(:syscall)
|
276
|
+
expect(subject.syscall).to be_kind_of(Fixnum)
|
277
|
+
expect(subject.syscall).to be >= 0
|
278
|
+
end
|
279
|
+
|
280
|
+
it "has a pri member that returns the expected value" do
|
281
|
+
expect(subject).to respond_to(:pri)
|
282
|
+
expect(subject.pri).to be_kind_of(Fixnum)
|
283
|
+
expect(subject.pri).to be >= 0
|
284
|
+
end
|
285
|
+
|
286
|
+
it "has a clname member that returns the expected value" do
|
287
|
+
expect(subject).to respond_to(:clname)
|
288
|
+
expect(subject.clname).to be_kind_of(String)
|
289
|
+
expect(subject.clname.size).to be_between(0,8)
|
290
|
+
end
|
291
|
+
|
292
|
+
it "has a name member that returns the expected value" do
|
293
|
+
expect(subject).to respond_to(:name)
|
294
|
+
expect(subject.name).to be_kind_of(String)
|
295
|
+
expect(subject.name.size).to be_between(0,16)
|
296
|
+
end
|
297
|
+
|
298
|
+
it "has an onpro member that returns the expected value" do
|
299
|
+
expect(subject).to respond_to(:onpro)
|
300
|
+
expect(subject.onpro).to be_kind_of(Fixnum)
|
301
|
+
expect(subject.onpro).to be >= 0
|
302
|
+
end
|
303
|
+
|
304
|
+
it "has a bindpro member that returns the expected value" do
|
305
|
+
expect(subject).to respond_to(:bindpro)
|
306
|
+
expect(subject.bindpro).to be_kind_of(Fixnum)
|
307
|
+
expect(subject.bindpro).to be >= -1
|
308
|
+
end
|
309
|
+
|
310
|
+
it "has a bindpset member that returns the expected value" do
|
311
|
+
expect(subject).to respond_to(:bindpset)
|
312
|
+
expect(subject.bindpset).to be_kind_of(Fixnum)
|
313
|
+
expect(subject.bindpset).to be >= -1
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
@@ -0,0 +1,317 @@
|
|
1
|
+
############################################################################
|
2
|
+
# sys_proctable_windows_spec.rb
|
3
|
+
#
|
4
|
+
# Test suite for the sys-proctable library for MS Windows. This should be
|
5
|
+
# run via the 'rake test' task.
|
6
|
+
############################################################################
|
7
|
+
require 'rspec'
|
8
|
+
require 'sys-proctable'
|
9
|
+
require 'socket'
|
10
|
+
require_relative 'sys_proctable_all_spec'
|
11
|
+
|
12
|
+
describe Sys::ProcTable do
|
13
|
+
let(:hostname) { Socket.gethostname }
|
14
|
+
let(:fields) {
|
15
|
+
%w[
|
16
|
+
caption
|
17
|
+
cmdline
|
18
|
+
comm
|
19
|
+
creation_class_name
|
20
|
+
creation_date
|
21
|
+
cs_creation_class_name
|
22
|
+
cs_name description
|
23
|
+
executable_path
|
24
|
+
execution_state
|
25
|
+
handle
|
26
|
+
handle_count
|
27
|
+
install_date
|
28
|
+
kernel_mode_time
|
29
|
+
maximum_working_set_size
|
30
|
+
minimum_working_set_size name
|
31
|
+
os_creation_class_name
|
32
|
+
os_name
|
33
|
+
other_operation_count
|
34
|
+
other_transfer_count
|
35
|
+
page_faults
|
36
|
+
page_file_usage
|
37
|
+
ppid
|
38
|
+
peak_page_file_usage
|
39
|
+
peak_virtual_size
|
40
|
+
peak_working_set_size
|
41
|
+
priority
|
42
|
+
private_page_count
|
43
|
+
pid
|
44
|
+
quota_non_paged_pool_usage
|
45
|
+
quota_paged_pool_usage
|
46
|
+
quota_peak_non_paged_pool_usage
|
47
|
+
quota_peak_paged_pool_usage
|
48
|
+
read_operation_count
|
49
|
+
read_transfer_count
|
50
|
+
session_id
|
51
|
+
status
|
52
|
+
termination_date
|
53
|
+
thread_count
|
54
|
+
user_mode_time
|
55
|
+
virtual_size
|
56
|
+
windows_version
|
57
|
+
working_set_size
|
58
|
+
write_operation_count
|
59
|
+
write_transfer_count
|
60
|
+
]
|
61
|
+
}
|
62
|
+
|
63
|
+
context "fields" do
|
64
|
+
it "responds to a fields method" do
|
65
|
+
expect(described_class).to respond_to(:fields)
|
66
|
+
end
|
67
|
+
|
68
|
+
it "returns the expected results for the fields method" do
|
69
|
+
expect(described_class.fields).to be_kind_of(Array)
|
70
|
+
expect(described_class.fields).to eql(fields)
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
context "ps" do
|
75
|
+
it "accepts an optional host" do
|
76
|
+
expect{ described_class.ps(host: hostname) }.to_not raise_error
|
77
|
+
end
|
78
|
+
|
79
|
+
it "ignores unused options" do
|
80
|
+
expect{ described_class.ps(:smaps => false) }.to_not raise_error
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
context "ProcTable::Struct members" do
|
85
|
+
subject { described_class.ps.first }
|
86
|
+
|
87
|
+
it "has a write_transfer_count struct member with the expected data type" do
|
88
|
+
expect(subject).to respond_to(:write_transfer_count)
|
89
|
+
expect(subject.write_transfer_count).to be_kind_of(Integer)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "has a write_operation_count struct member with the expected data type" do
|
93
|
+
expect(subject).to respond_to(:write_operation_count)
|
94
|
+
expect(subject.write_operation_count).to be_kind_of(Integer)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "has a working_set_size struct member with the expected data type" do
|
98
|
+
expect(subject).to respond_to(:working_set_size)
|
99
|
+
expect(subject.working_set_size).to be_kind_of(Integer)
|
100
|
+
end
|
101
|
+
|
102
|
+
it "has a windows_version struct member with the expected data type" do
|
103
|
+
expect(subject).to respond_to(:windows_version)
|
104
|
+
expect(subject.windows_version).to be_kind_of(String)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "has a virtual_size struct member with the expected data type" do
|
108
|
+
expect(subject).to respond_to(:virtual_size)
|
109
|
+
expect(subject.virtual_size).to be_kind_of(Integer)
|
110
|
+
end
|
111
|
+
|
112
|
+
it "has a user_mode_time struct member with the expected data type" do
|
113
|
+
expect(subject).to respond_to(:user_mode_time)
|
114
|
+
expect(subject.user_mode_time).to be_kind_of(Integer)
|
115
|
+
end
|
116
|
+
|
117
|
+
it "has a thread_count struct member with the expected data type" do
|
118
|
+
expect(subject).to respond_to(:thread_count)
|
119
|
+
expect(subject.thread_count).to be_kind_of(Integer)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "has a termination_date struct member with the expected data type" do
|
123
|
+
expect(subject).to respond_to(:termination_date)
|
124
|
+
expect(subject.termination_date).to be_kind_of(Date) if subject.termination_date
|
125
|
+
end
|
126
|
+
|
127
|
+
it "has a status struct member with the expected data type" do
|
128
|
+
expect(subject).to respond_to(:status)
|
129
|
+
expect(subject.status).to be_nil # Always nil according to MSDN
|
130
|
+
end
|
131
|
+
|
132
|
+
it "has a session_id struct member with the expected data type" do
|
133
|
+
expect(subject).to respond_to(:session_id)
|
134
|
+
expect(subject.session_id).to be_kind_of(Integer)
|
135
|
+
end
|
136
|
+
|
137
|
+
it "has a read_transfer_count struct member with the expected data type" do
|
138
|
+
expect(subject).to respond_to(:read_transfer_count)
|
139
|
+
expect(subject.read_transfer_count).to be_kind_of(Integer)
|
140
|
+
end
|
141
|
+
|
142
|
+
it "has a read_operation_count struct member with the expected data type" do
|
143
|
+
expect(subject).to respond_to(:read_operation_count)
|
144
|
+
expect(subject.read_operation_count).to be_kind_of(Integer)
|
145
|
+
end
|
146
|
+
|
147
|
+
it "has a quota_peak_paged_pool_usage struct member with the expected data type" do
|
148
|
+
expect(subject).to respond_to(:quota_peak_paged_pool_usage)
|
149
|
+
expect(subject.quota_peak_paged_pool_usage).to be_kind_of(Integer)
|
150
|
+
end
|
151
|
+
|
152
|
+
it "has a quota_peak_non_paged_pool_usage struct member with the expected data type" do
|
153
|
+
expect(subject).to respond_to(:quota_peak_non_paged_pool_usage)
|
154
|
+
expect(subject.quota_peak_non_paged_pool_usage).to be_kind_of(Integer)
|
155
|
+
end
|
156
|
+
|
157
|
+
it "has a quota_paged_pool_usage struct member with the expected data type" do
|
158
|
+
expect(subject).to respond_to(:quota_paged_pool_usage)
|
159
|
+
expect(subject.quota_paged_pool_usage).to be_kind_of(Integer)
|
160
|
+
end
|
161
|
+
|
162
|
+
it "has a quota_non_paged_pool_usage struct member with the expected data type" do
|
163
|
+
expect(subject).to respond_to(:quota_non_paged_pool_usage)
|
164
|
+
expect(subject.quota_non_paged_pool_usage).to be_kind_of(Integer)
|
165
|
+
end
|
166
|
+
|
167
|
+
it "has a pid struct member with the expected data type" do
|
168
|
+
expect(subject).to respond_to(:pid)
|
169
|
+
expect(subject.pid).to be_kind_of(Integer)
|
170
|
+
end
|
171
|
+
|
172
|
+
it "has a private_page_count struct member with the expected data type" do
|
173
|
+
expect(subject).to respond_to(:private_page_count)
|
174
|
+
expect(subject.private_page_count).to be_kind_of(Integer)
|
175
|
+
end
|
176
|
+
|
177
|
+
it "has a priority struct member with the expected data type" do
|
178
|
+
expect(subject).to respond_to(:priority)
|
179
|
+
expect(subject.priority).to be_kind_of(Integer)
|
180
|
+
end
|
181
|
+
|
182
|
+
it "has a peak_working_set_size struct member with the expected data type" do
|
183
|
+
expect(subject).to respond_to(:peak_working_set_size)
|
184
|
+
expect(subject.peak_working_set_size).to be_kind_of(Integer)
|
185
|
+
end
|
186
|
+
|
187
|
+
it "has a peak_virtual_size struct member with the expected data type" do
|
188
|
+
expect(subject).to respond_to(:peak_virtual_size)
|
189
|
+
expect(subject.peak_virtual_size).to be_kind_of(Integer)
|
190
|
+
end
|
191
|
+
|
192
|
+
it "has a peak_page_file_usage struct member with the expected data type" do
|
193
|
+
expect(subject).to respond_to(:peak_page_file_usage)
|
194
|
+
expect(subject.peak_page_file_usage).to be_kind_of(Integer)
|
195
|
+
end
|
196
|
+
|
197
|
+
it "has a ppid struct member with the expected data type" do
|
198
|
+
expect(subject).to respond_to(:ppid)
|
199
|
+
expect(subject.ppid).to be_kind_of(Integer)
|
200
|
+
end
|
201
|
+
|
202
|
+
it "has a page_file_usage struct member with the expected data type" do
|
203
|
+
expect(subject).to respond_to(:page_file_usage)
|
204
|
+
expect(subject.page_file_usage).to be_kind_of(Integer)
|
205
|
+
end
|
206
|
+
|
207
|
+
it "has a page_faults struct member with the expected data type" do
|
208
|
+
expect(subject).to respond_to(:page_faults)
|
209
|
+
expect(subject.page_faults).to be_kind_of(Integer)
|
210
|
+
end
|
211
|
+
|
212
|
+
it "has a other_transfer_count struct member with the expected data type" do
|
213
|
+
expect(subject).to respond_to(:other_transfer_count)
|
214
|
+
expect(subject.other_transfer_count).to be_kind_of(Integer)
|
215
|
+
end
|
216
|
+
|
217
|
+
it "has a other_operation_count struct member with the expected data type" do
|
218
|
+
expect(subject).to respond_to(:other_operation_count)
|
219
|
+
expect(subject.other_operation_count).to be_kind_of(Integer)
|
220
|
+
end
|
221
|
+
|
222
|
+
it "has a os_name struct member with the expected data type" do
|
223
|
+
expect(subject).to respond_to(:os_name)
|
224
|
+
expect(subject.os_name).to be_kind_of(String)
|
225
|
+
end
|
226
|
+
|
227
|
+
it "has a os_creation_class_name struct member with the expected data type" do
|
228
|
+
expect(subject).to respond_to(:os_creation_class_name)
|
229
|
+
expect(subject.os_creation_class_name).to be_kind_of(String)
|
230
|
+
end
|
231
|
+
|
232
|
+
it "has a name struct member with the expected data type" do
|
233
|
+
expect(subject).to respond_to(:name)
|
234
|
+
expect(subject.name).to be_kind_of(String)
|
235
|
+
end
|
236
|
+
|
237
|
+
it "has a minimum_working_set_size struct member with the expected data type" do
|
238
|
+
expect(subject).to respond_to(:minimum_working_set_size)
|
239
|
+
expect(subject.minimum_working_set_size).to be_kind_of(Integer) if subject.minimum_working_set_size
|
240
|
+
end
|
241
|
+
|
242
|
+
it "has a maximum_working_set_size struct member with the expected data type" do
|
243
|
+
expect(subject).to respond_to(:maximum_working_set_size)
|
244
|
+
expect(subject.maximum_working_set_size).to be_kind_of(Integer) if subject.maximum_working_set_size
|
245
|
+
end
|
246
|
+
|
247
|
+
it "has a kernel_mode_time struct member with the expected data type" do
|
248
|
+
expect(subject).to respond_to(:kernel_mode_time)
|
249
|
+
expect(subject.kernel_mode_time).to be_kind_of(Integer)
|
250
|
+
end
|
251
|
+
|
252
|
+
it "has a install_date struct member with the expected data type" do
|
253
|
+
expect(subject).to respond_to(:install_date)
|
254
|
+
expect(subject.install_date).to be_kind_of(Date) if subject.install_date
|
255
|
+
end
|
256
|
+
|
257
|
+
it "has a handle_count struct member with the expected data type" do
|
258
|
+
expect(subject).to respond_to(:handle_count)
|
259
|
+
expect(subject.handle_count).to be_kind_of(Integer)
|
260
|
+
end
|
261
|
+
|
262
|
+
it "has a handle struct member with the expected data type" do
|
263
|
+
expect(subject).to respond_to(:handle)
|
264
|
+
expect(subject.handle).to be_kind_of(String)
|
265
|
+
end
|
266
|
+
|
267
|
+
it "has a execution_state struct member with the expected data type" do
|
268
|
+
expect(subject).to respond_to(:execution_state)
|
269
|
+
expect(subject.execution_state).to be_nil
|
270
|
+
end
|
271
|
+
|
272
|
+
it "has a executable_path struct member with the expected data type" do
|
273
|
+
expect(subject).to respond_to(:executable_path)
|
274
|
+
expect(subject.executable_path).to be_kind_of(String) if subject.executable_path
|
275
|
+
end
|
276
|
+
|
277
|
+
it "has a description struct member with the expected data type" do
|
278
|
+
expect(subject).to respond_to(:description)
|
279
|
+
expect(subject.description).to be_kind_of(String)
|
280
|
+
end
|
281
|
+
|
282
|
+
it "has a cs_name struct member with the expected data type" do
|
283
|
+
expect(subject).to respond_to(:cs_name)
|
284
|
+
expect(subject.cs_name).to be_kind_of(String)
|
285
|
+
end
|
286
|
+
|
287
|
+
it "has a cs_creation_class_name struct member with the expected data type" do
|
288
|
+
expect(subject).to respond_to(:cs_creation_class_name)
|
289
|
+
expect(subject.cs_creation_class_name).to be_kind_of(String)
|
290
|
+
end
|
291
|
+
|
292
|
+
it "has a creation_date struct member with the expected data type" do
|
293
|
+
expect(subject).to respond_to(:creation_date)
|
294
|
+
expect(subject.creation_date).to be_kind_of(Date) if subject.creation_date
|
295
|
+
end
|
296
|
+
|
297
|
+
it "has a creation_class_name struct member with the expected data type" do
|
298
|
+
expect(subject).to respond_to(:creation_class_name)
|
299
|
+
expect(subject.creation_class_name).to be_kind_of(String)
|
300
|
+
end
|
301
|
+
|
302
|
+
it "has a comm struct member with the expected data type" do
|
303
|
+
expect(subject).to respond_to(:comm)
|
304
|
+
expect(subject.comm).to be_kind_of(String)
|
305
|
+
end
|
306
|
+
|
307
|
+
it "has a cmdline struct member with the expected data type" do
|
308
|
+
expect(subject).to respond_to(:cmdline)
|
309
|
+
expect(subject.cmdline).to be_kind_of(String) if subject.cmdline
|
310
|
+
end
|
311
|
+
|
312
|
+
it "has a caption struct member with the expected data type" do
|
313
|
+
expect(subject).to respond_to(:caption)
|
314
|
+
expect(subject.caption).to be_kind_of(String)
|
315
|
+
end
|
316
|
+
end
|
317
|
+
end
|