Project

General

Profile

Bug #15652

Profiler__ is not working correctly (ruby 2.6)

Added by hellio6 (Luc Vu) about 1 month ago. Updated about 1 month ago.

Status:
Rejected
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
[ruby-core:91736]

Description

Try running the Profiler example from documentation page.
(https://docs.ruby-lang.org/en/2.6.0/Profiler__.html)


require 'profile'

def slow_method
  5000.times do
    9999*999999999
  end
end

def fast_method
  5000.times do
    9999+999999999
  end
end

slow_method
fast_method

Output:


  %   cumulative   self              self     total
 time   seconds   seconds    calls  ms/call  ms/call  name
 79.49     0.06      0.06        2    31.00    39.00  Integer#times
 20.51     0.08      0.02     5001     0.00     0.01  Object#slow_method
  0.00     0.08      0.00        2     0.00     0.00  Module#method_added
  0.00     0.08      0.00        1     0.00     0.00  TracePoint#enable
  0.00     0.08      0.00     5001     0.00     0.01  Object#fast_method
  0.00     0.08      0.00        1     0.00     0.00  TracePoint#disable
  0.00     0.08      0.00        1     0.00     0.00  TracePoint#__enable
  0.00     0.08      0.00        1     0.00    78.00  #toplevel


By this output, the slow_method and fast_method is called 5000 times?
I think this is not correct and not match with documentation page

Associated revisions

Revision bc76d8a2
Added by hsbt (Hiroshi SHIBATA) about 1 month ago

Removed from standard library. No one maintains it from Ruby 2.0.0.

[Bug #15652][ruby-core:91736]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 67215
Added by hsbt (Hiroshi SHIBATA) about 1 month ago

Removed from standard library. No one maintains it from Ruby 2.0.0.

[Bug #15652][ruby-core:91736]

History

Updated by hsbt (Hiroshi SHIBATA) about 1 month ago

  • Assignee set to hsbt (Hiroshi SHIBATA)
  • Status changed from Open to Rejected

Unfortunately, No one maintains it. I suggest using the alternative tool like rbspy.

Also available in: Atom PDF