From: hsbt@ruby-lang.org
To: ruby-core@ruby-lang.org
Subject: [ruby-core:91774] [Ruby trunk Bug#15652] Profiler__ is not working correctly (ruby 2.6)
Date: Mon, 11 Mar 2019 11:36:19 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-77051.20190311113447.adcd7d9862083909@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-15652.20190310163402@ruby-lang.org
Issue #15652 has been updated by hsbt (Hiroshi SHIBATA).
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](https://github.com/rbspy/rbspy).
----------------------------------------
Bug #15652: Profiler__ is not working correctly (ruby 2.6)
https://bugs.ruby-lang.org/issues/15652#change-77051
* Author: hellio6 (Luc Vu)
* Status: Rejected
* Priority: Normal
* Assignee: hsbt (Hiroshi SHIBATA)
* Target version:
* ruby -v: ruby 2.6.0p0 (2018-12-25 revision 66547) [x64-mingw32]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Try running the Profiler example from documentation page.
(https://docs.ruby-lang.org/en/2.6.0/Profiler__.html)
``` ruby
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
--
https://bugs.ruby-lang.org/
prev parent reply other threads:[~2019-03-11 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-15652.20190310163402@ruby-lang.org>
2019-03-10 16:34 ` [ruby-core:91736] [Ruby trunk Bug#15652] Profiler__ is not working correctly (ruby 2.6) luc.vunang
2019-03-11 11:36 ` hsbt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-77051.20190311113447.adcd7d9862083909@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).