aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/notifications')
-rw-r--r--activesupport/lib/active_support/notifications/instrumenter.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/notifications/instrumenter.rb b/activesupport/lib/active_support/notifications/instrumenter.rb
index 9184f8f54b..a721187d2d 100644
--- a/activesupport/lib/active_support/notifications/instrumenter.rb
+++ b/activesupport/lib/active_support/notifications/instrumenter.rb
@@ -52,8 +52,7 @@ module ActiveSupport
end
class Event
- attr_reader :name, :time, :transaction_id, :payload, :children
- attr_accessor :end
+ attr_reader :name, :time, :end, :transaction_id, :payload, :children
def self.clock_gettime_supported? # :nodoc:
defined?(Process::CLOCK_PROCESS_CPUTIME_ID) &&
@@ -88,6 +87,11 @@ module ActiveSupport
@allocation_count_finish = now_allocations
end
+ def end=(ending)
+ ActiveSupport::Deprecation.deprecation_warning(:end=, :finish!)
+ @end = ending
+ end
+
# Returns the CPU time (in milliseconds) passed since the call to
# +start!+ and the call to +finish!+
def cpu_time