module HTTPX::Plugins::Tracing::HTTP2Methods

  1. lib/httpx/plugins/tracing.rb

Methods

Public Class

  1. new

Public Instance

  1. send

Public Class methods

new(*)
[show source]
    # File lib/httpx/plugins/tracing.rb
176 def initialize(*)
177   super
178 
179   @handshake_time = nil
180   @handshake_init_time = ::Time.now.utc
181 end

Public Instance methods

send(request, head = false)
[show source]
    # File lib/httpx/plugins/tracing.rb
183 def send(request, head = false)
184   if head
185     # only true for pending requests waiting on the handshake, so handshake time accrues.
186     request.handshake_time ||= 0.0
187     request.handshake_time += @handshake_time
188   end
189 
190   super
191 end