简体   繁体   中英

How to reduce the number of methods omitted by Rubinius' profiler

When I run Rubinius' profiler , using something like

ruby -Xprofiler.graph test/test_suite.rb

with the following within the test suite

# Code for actual tests here

# create a profiler instance
profiler = Rubinius::Profiler::Instrumenter.new

# start the profiler
profiler.start

# Run test unit now
require 'test/unit'
class Test::Unit::Runner
  @@stop_auto_run = true
end
Test::Unit::Runner.new.run(ARGV)

profiler.stop

# print out the profiler info
profiler.show  # takes on IO object, defaults to STDOUT

I often see something like

1,379 methods omitted

1,424 methods called a total of 0 times

presumably because the remaining methods are too small to meet some threshold of time taken.

I tried using something like -Xprofiler.threshold=10000 , but it didn't seem to help.

How can I modify how many methods are omitted by Rubinius' profiler?

使用-Xprofiler.full_report选项。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM