Sha256: deb555b0c8636a469867c6d3dd3a73b731af55aa67f32f1c3f0f6e8e19f2c886
Contents?: true
Size: 717 Bytes
Versions: 9
Compression:
Stored size: 717 Bytes
Contents
# frozen_string_literal: true 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
9 entries across 9 versions & 1 rubygems