Sha256: 88eb3f0d3582e364e09a0f4d787f86f58ad422ac3d3b987ad64b43ea81ca5354
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
module Rack class MiniProfiler module TimerStruct # Timing system for a custom timers such as cache, redis, RPC, external API # calls, etc. class Custom < TimerStruct::Base 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 super( :type => type, :start_milliseconds => start_millis, :duration_milliseconds => duration_ms, :parent_timing_id => nil ) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rack-mini-profiler-0.10.7 | lib/mini_profiler/timer_struct/custom.rb |