class Rack::MiniProfiler::TimerStruct::Custom
Timing system for a custom timers such as cache, redis, RPC, external API calls, etc.
Public Class Methods
new(type, duration_ms, page, parent)
click to toggle source
Calls superclass method
Rack::MiniProfiler::TimerStruct::Base::new
# File lib/mini_profiler/timer_struct/custom.rb, line 7 def initialize(type, duration_ms, page, parent) @parent = parent @page = page @type = type start_millis = ((Time.now.to_f * 1000).to_i - page[:started]) - duration_ms super( :type => type, :start_milliseconds => start_millis, :duration_milliseconds => duration_ms, :parent_timing_id => nil ) end