From fdfc52151916b67d44be459afc674ab82f27004e Mon Sep 17 00:00:00 2001 From: zzak Date: Sun, 19 May 2013 23:04:36 +0000 Subject: * lib/profiler.rb: Document Profiler__ methods git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/profiler.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/profiler.rb') diff --git a/lib/profiler.rb b/lib/profiler.rb index be33daf662..e53951cbe6 100644 --- a/lib/profiler.rb +++ b/lib/profiler.rb @@ -96,6 +96,9 @@ module Profiler__ end } module_function + # Starts the profiler. + # + # See Profiler__ for more information. def start_profile @@start = Process.times[0] @@stacks = {} @@ -103,10 +106,16 @@ module_function PROFILE_CALL_PROC.enable PROFILE_RETURN_PROC.enable end + # Stops the profiler. + # + # See Profiler__ for more information. def stop_profile PROFILE_CALL_PROC.disable PROFILE_RETURN_PROC.disable end + # Outputs the results from the profiler. + # + # See Profiler__ for more information. def print_profile(f) stop_profile total = Process.times[0] - @@start -- cgit v1.2.3