Closed ColinDKelley closed 14 years ago
The proc reading is of interest to me. The ps fork/exec method is a significant performance hit.
Colin -
These both sound valuable. If you submit a patch I will merge them in. Thanks -
Noah
Great, I'll put a patch together with tests, within a week or so.
Noah,
I've sent you the patch. For the rspec test I required mocha. Hope that's ok.
-Colin
Thanks Colin - I'll take a look this weekend when I have a bit more free time.
I just merged in your change. I removed the mocha dependency just because I'm more familiar with rspec's mocking/stubbing. Thanks for your contribution -- especially for providing tests.
I noticed that the monitoring is looking at resident set rss. On a memory-starved machine that will be lower than the real bloat since you're constrained on physical memory. Virtual size (vsz) would be more accurate wouldn't it?
Also I noticed that the data is gathered by running
ps
. On linux machines there is a /proc directory which can be read, avoiding a whole fork/exec. I have that working using the equivalent of vsz.I can contribute a patch with both these changes if there's interest.