summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-19 23:04:36 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-19 23:04:36 +0000
commitfdfc52151916b67d44be459afc674ab82f27004e (patch)
tree0f5b35fab4ab26437bc95e253cf4057a0a5be891
parentcaca17a8987d53f47822c63120047ca6de4984ea (diff)
* lib/profiler.rb: Document Profiler__ methods
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--lib/profiler.rb9
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index a5f14c4..940e6cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* lib/tempfile.rb: nodoc Tempfile#inspect
diff --git a/lib/profiler.rb b/lib/profiler.rb
index be33daf..e53951c 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