lib/mini_profiler/timer_struct/custom.rb in rack-mini-profiler-1.1.6 vs lib/mini_profiler/timer_struct/custom.rb in rack-mini-profiler-2.0.0
- old
+ new
@@ -4,9 +4,10 @@
class MiniProfiler
module TimerStruct
# Timing system for a custom timers such as cache, redis, RPC, external API
# calls, etc.
class Custom < TimerStruct::Base
+ attr_accessor :parent
def initialize(type, duration_ms, page, parent)
@parent = parent
@page = page
@type = type
start_millis = ((Process.clock_gettime(Process::CLOCK_MONOTONIC) * 1000).to_i - page[:started]) - duration_ms