Skip to content

Commit e5124ae

Browse files
Autolink references for AS::Notifications::Instrumenter [ci-skip]
This also rewords occurrences of "made since the call to `start!` and the call to `finish!`" to "made between the call to `start!` and the call to `finish!`", for clarity.
1 parent 0f535a8 commit e5124ae

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

activesupport/lib/active_support/notifications/instrumenter.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ def instrument(name, payload = {})
6565
end
6666
end
6767

68-
# Returns a "handle" for an event with the given +name+ and +payload+
68+
# Returns a "handle" for an event with the given +name+ and +payload+.
6969
#
70-
# +#start+ and +#finish+ must each be called exactly once on the returned object.
70+
# #start and #finish must each be called exactly once on the returned object.
7171
#
72-
# Where possible, it's best to use +#instrument+, which will record the
72+
# Where possible, it's best to use #instrument, which will record the
7373
# start and finish of the event and correctly handle any exceptions.
7474
# +build_handle+ is a low-level API intended for cases where using
75-
# +#instrument+ isn't possible.
75+
# +instrument+ isn't possible.
7676
#
77-
# See ActiveSupport::Notifications::Fanout::Handle
77+
# See ActiveSupport::Notifications::Fanout::Handle.
7878
def build_handle(name, payload)
7979
@notifier.build_handle(name, @id, payload)
8080
end
@@ -146,21 +146,21 @@ def finish!
146146
@allocation_count_finish = now_allocations
147147
end
148148

149-
# Returns the CPU time (in milliseconds) passed since the call to
150-
# +start!+ and the call to +finish!+
149+
# Returns the CPU time (in milliseconds) passed between the call to
150+
# #start! and the call to #finish!.
151151
def cpu_time
152152
@cpu_time_finish - @cpu_time_start
153153
end
154154

155-
# Returns the idle time time (in milliseconds) passed since the call to
156-
# +start!+ and the call to +finish!+
155+
# Returns the idle time time (in milliseconds) passed between the call to
156+
# #start! and the call to #finish!.
157157
def idle_time
158158
diff = duration - cpu_time
159159
diff > 0.0 ? diff : 0.0
160160
end
161161

162-
# Returns the number of allocations made since the call to +start!+ and
163-
# the call to +finish!+
162+
# Returns the number of allocations made between the call to #start! and
163+
# the call to #finish!.
164164
def allocations
165165
@allocation_count_finish - @allocation_count_start
166166
end

0 commit comments

Comments
 (0)