On Mon, 2008-09-01 at 11:01 +0900, AzimuthDragon wrote:
> Sorry, I should have specified that I'm using Windows XP SP2 :\
> 
> However, I want the program to be able to run on Linux, Windows, and Mac 
> without difficulty, though Windows is my primary concern. I can figure out 
> how to choose which way to measure on a different platform but I don't know 
> how to measure it in the first place. ^^;

Well ... on Windows, there's a well-defined API to pull performance data
from the registry, so you'd just need to hunt down that documentation
and write Ruby code to go pick it up and format it however you want.
There are Perl modules on CPAN that do this, so the time-honored cheat
of taking a Perl module and translating it by hand to Ruby will probably
get you going fairly quickly.

On Linux, chase down the links I posted in an earler message. On Macs or
Solaris, the best plan is probably to use "dtrace" to collect the data
externally to your Ruby process(es) and just write Ruby post-processing
scripts.
-- 
M. Edward (Ed) Borasky
ruby-perspectives.blogspot.com

"A mathematician is a machine for turning coffee into theorems." --
Alfrƥd Rƥnyi via Paul Erd