Project

General

Profile

Actions

Bug #9703

closed

Inconsistent profile output

Added by silverhammermba (Max Anselm) over 10 years ago. Updated over 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
[ruby-core:61861]

Description

The output of the profile lib seems to be partially dependent on how it is required. For example,

ruby -rprofile -e '0==1'

shows one call to Fixnum#== as expected

ruby -e 'require "profile"; 0==1'

does not show any calls to Fixnum#== !!!

ruby -e 'require "profile"; eval("0==1")'

again shows one call to Fixnum#== as expected.

See also: http://stackoverflow.com/questions/22861559/what-is-the-difference-between-r-profile-and-require-profile

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0