Closed NickLaMuro closed 6 years ago
Not sure what the test failures are about. It's been a while, but I think it's a conflict with the new test-unit and the one in the stdlib. Interesting that it only seems to happen with 2.1 and earlier. I should probably just move everything over to rspec anyway.
Anyway, looks good.
Pulled out from https://github.com/ManageIQ/manageiq.org/pull/640
Description
This is basically a memoization of mapping the keys for the intermediate
FFI::Struct
objects to the fields in theSys::ProcTable::ProcTableStruct
which avoids every pid being analyzed having to re-generate these values when.ps
is called for all pids (duplicate work), and even saves a bit of work/mem when calling.ps
for just one pids as well..Benchmarks
Coming soon...Well, this was merged already, but here are some benchmarks for funsies:
Objects allocated:
Benchmarks taken by doing the following:
The above tests the gem when installed via
gem install sys-proctable
. To use the source, you would runrake install
from this repo dir, and then require usingrequire 'sys/proctable'
instead.Results:
IPS
Munged results from all four invocations of the
bench/bench_ips_ps
script: