CodePrairie .NET

South Dakota .NET User Group


Getting profile data from ruby (using Powershell)

Since I'm on windows I'm running this from powershell.

ruby -r profile myprogram.rb 2> prof.log

This will turn on ruby's profiling which writes to STDERR. the 2> catches that output and puts it into a file.

Now after you run this there will be a bunch of noise in your prof.log file, so to remove it just do

gc prof.log | where { $_ -notmatch "^At" } | where { $_ -notmatch "^\+"} > perf.log
Published Sep 05 2007, 08:10 AM by chrisortman
Filed under: ,


No Comments

Leave a Comment

Powered by Community Server (Commercial Edition), by Telligent Systems