Questions tagged [ruby-prof]

34 questions
2
votes
1 answer

Why does ruby-prof list "Kernel#`" as a resource hog?

I'm using ruby-prof to figure out where my CPU time is going for a small 2D game engine I'm building in Ruby. Everything looks normal here aside from the main Kernel#` entry. The Ruby docs here would suggest that this is a function for getting the…
taylorthurlow
  • 2,953
  • 3
  • 28
  • 42
2
votes
2 answers

Low-overhead Ruby profiling?

I have a Ruby program that takes about 4 minutes to complete task and I'd like to get it down to under 1 minute. I tried ruby-prof from gem but enabling it increases running times to ~30 minutes, and doesn't even seem to preserve monotonicity…
taw
  • 18,110
  • 15
  • 57
  • 76
2
votes
2 answers

Is it possible to ignore irrelevant methods when profiling ruby applications?

While using ruby-prof, printed out in graph-html mode, the report for one method says (with some snipping) %Total %Self Total Self Wait Child Calls Name Line 52.85% 0.00% 51.22 0.00 0.00 …
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
1
vote
1 answer

Ruby profiler results interpretation

I'm using a ruby-prof gem to profile my code. And results looks like this: %self total self wait child calls name 50.56 31.06 23.45 0.00 7.62 234593 Array#each 14.29 6.62 6.62 0.00 0.00 …
taro
  • 5,772
  • 2
  • 30
  • 34
1
vote
2 answers

undefined method 'threads' using ruby-prof

I'm trying to use ruby-prof to profile some code. It seems to work up until the line indicated below: require 'rubygems' require 'ruby-prof' result = RubyProf.start do puts "do stuff..." end printer =…
recursive_acronym
  • 2,981
  • 6
  • 40
  • 59
1
vote
1 answer

ruby-prof "Wait" column in the results: what is it?

The results for the ruby-prof output always contains a value for the "Wait" column. However, I've never found a description of what this value is and in all the times I've used ruby-prof, I've never seen this column ever take on a value other than…
Pete
  • 17,885
  • 4
  • 32
  • 30
1
vote
1 answer

rails performance test is failing

Simple performance test, I have installed ruby-prof and no other gems are missing, rake test:profile returns the following error. the test is simply. require 'test_helper' require 'performance_test_help' # Profiling results for each test method are…
badnaam
  • 1,876
  • 4
  • 29
  • 53
1
vote
0 answers

Reading ruby-prof stack html output - I am confused

I used ruby-prof to generate stack call graph. It generates its very nice, but it shows only 3 of like 10 calls inside the method. These 3 calls, according to timing consume like 100% time inside this method. I assume that other calls are not shown,…
Sławosz
  • 11,187
  • 15
  • 73
  • 106
1
vote
1 answer

Ruby-prof with graph printer and sorting by self puts out total percentages higher than 100%

If I run ruby-prof -p graph -s self aggregate.rb > graph.txt the first few lines of my graph.txt will look like: Total Time: 40.092432 %total %self total self wait child calls …
kaihowl
  • 372
  • 2
  • 13
1
vote
1 answer

Is there a trick to profiling memory usage w/ ruby-prof using an rvm gemset?

I've been trying to get ruby-prof working for memory usage on Mac OS X w/ Ruby 1.8.7 and so far I'm not having much luck. I understand from the documentation that RubyProf::MEMORY mode requires a patched version of Ruby. I've tried installing the…
Dan Tao
  • 125,917
  • 54
  • 300
  • 447
0
votes
2 answers

rails ruby-prof and benchmark testing

I'm running Rails 2.2.2. I've read a few articles about ruby-prof and profiling a rails app. And I'm confused as to how things are really working. I was originally using this tutorial…
brad
  • 31,987
  • 28
  • 102
  • 155
0
votes
1 answer

run ruby-prof with a script that takes arguments

I know how to start ruby-prof with a script: ruby-prof -p multi [SCRIPT_PATH]/my_script.rb but how can I run ruby-prof with a script that takes arguments ?
Mohamed Hakki
  • 88
  • 1
  • 10
0
votes
1 answer

Can I reuse my integration test suite to profile a Rails app?

Most posts on Rails profiling recommend Ruby-Prof. To use Ruby-Prof I need to write at least one new test for each controller action, then manually compare the results to see what's taking the longest and might be a candidate for optimization. This…
Sasgorilla
  • 2,403
  • 2
  • 29
  • 56
0
votes
2 answers

Profile memory-performance for part of an rails project

I want to test the profile usage of an important library-class of my rails-project. It uses ActiveRecord so I need all rails dependencies to profile it. As far as I know, I need a patched ruby (rubygc) so script/profile and script/benchmark can…
Florian Pilz
  • 8,002
  • 4
  • 22
  • 30
0
votes
1 answer

What's the purpose of ruby-prof in NewRelic agent?

I tested the ruby agent 3.7.1.188 of New Relic but I don't understand the purpose of the ruby-prof gem. When I go to http://localhost:3000/newrelic, on the right side is a message that says that I can use the ruby-prof gem to display profiles. So I…
NMO
  • 748
  • 8
  • 16