It’s bleak to have leaks.
third update
Please see here for up-to-date documentation.
second update
There is now a pure-C heap instrumentation as well as the Ruby/ObjectSpace one. You really should be using the C version. It requires you to compile a custom binary, though. Just go to the plugin’s folder (vendor/plugins/bleak_house
in your app, or bleak_house-5.1/
in your system’s gems/
) and run:
sudo rake ruby:build
update
I had to junk Rublique because it was introducing its own leaks (via method unbinding) and used an unreliable delta algorithm. Instead the plugin now uses BleakHouse::MemLogger, which is faster and more accurate. Rublique gave me the original idea, so I can’t complain.
A gem version is now available, too. Install and then require 'bleak_house'
in config/environment.rb
. Usage is the same, but you have to manually install the Rake task in each app (the gem install message will explain).
postscript
You can report any issues on the forum. Also, Chris Carter says BleakHouse is starting a trend in emo Ruby-naming.
That’s all. Go scale something already.
Neat product! Still trying to get it to work, though. I’m running Rails in Windows XP and the following line puzzles me, because it won’t work from a DOS prompt:
I assume I need to add these lines to environment.rb:
And then run the web server as I normally would. Am I right?
I figured it out. I put these lines at the bottom of my environment.rb:
That should work, although the
require
might not be necessary. You should also be able to do (at the DOS prompt):And I guess to turn it off (assuming you don’t just close the prompt):
These aren’t tested, since I don’t have a Rails stack installed in Parallels.
Are you deploying on Windows, too? The closer your testbed is to your actual deployment situation, the more accurate your results will be.
Hmm i get this error:
I reinstalled the fonts, ImageMagick, and RMagick, yet no luck. Any ideas anyone?
Looks like your RMagick is broke. Do the RMagick tests run?
Yeah upgraded Ruby and gems and gem system etc. and Magick error is gone, but now i get this …
Hmm it seems to be a problem with the app I tested it on…it works just fine on another app…
Just scanning through the images…looks great! Neat job!
Cool.
I made a Rubyforge forum now for reporting problems and suggestions. Should be easier to manage than in the blog comments.
Can I ask how you created your graph? I haven’t seen a Ruby graphing solution yet that can handle so many items at once.
Tobin, I monkey-patched Gruff. It’s all in the BleakHouse source.