mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/profiler.rb: Document Profiler__ methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
caca17a898
commit
fdfc521519
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Mon May 20 08:03:51 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
|
* lib/profiler.rb: Document Profiler__ methods
|
||||||
|
|
||||||
Mon May 20 08:02:13 2013 Zachary Scott <zachary@zacharyscott.net>
|
Mon May 20 08:02:13 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||||
|
|
||||||
* lib/tempfile.rb: nodoc Tempfile#inspect
|
* lib/tempfile.rb: nodoc Tempfile#inspect
|
||||||
|
|
|
@ -96,6 +96,9 @@ module Profiler__
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
module_function
|
module_function
|
||||||
|
# Starts the profiler.
|
||||||
|
#
|
||||||
|
# See Profiler__ for more information.
|
||||||
def start_profile
|
def start_profile
|
||||||
@@start = Process.times[0]
|
@@start = Process.times[0]
|
||||||
@@stacks = {}
|
@@stacks = {}
|
||||||
|
@ -103,10 +106,16 @@ module_function
|
||||||
PROFILE_CALL_PROC.enable
|
PROFILE_CALL_PROC.enable
|
||||||
PROFILE_RETURN_PROC.enable
|
PROFILE_RETURN_PROC.enable
|
||||||
end
|
end
|
||||||
|
# Stops the profiler.
|
||||||
|
#
|
||||||
|
# See Profiler__ for more information.
|
||||||
def stop_profile
|
def stop_profile
|
||||||
PROFILE_CALL_PROC.disable
|
PROFILE_CALL_PROC.disable
|
||||||
PROFILE_RETURN_PROC.disable
|
PROFILE_RETURN_PROC.disable
|
||||||
end
|
end
|
||||||
|
# Outputs the results from the profiler.
|
||||||
|
#
|
||||||
|
# See Profiler__ for more information.
|
||||||
def print_profile(f)
|
def print_profile(f)
|
||||||
stop_profile
|
stop_profile
|
||||||
total = Process.times[0] - @@start
|
total = Process.times[0] - @@start
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue