Connection mixin
Public Class methods
new(*)
[show source]
# File lib/httpx/plugins/tracing.rb 113 def initialize(*) 114 super 115 116 @init_time = ::Time.now.utc 117 end
Public Instance methods
idling()
[show source]
# File lib/httpx/plugins/tracing.rb 127 def idling 128 super 129 130 # time of initial request(s) is accounted from the moment 131 # the connection is back to :idle, and ready to connect again. 132 @init_time = ::Time.now.utc 133 end
send(request)
[show source]
# File lib/httpx/plugins/tracing.rb 119 def send(request) 120 # request init time is only the same as the connection init time 121 # if the connection is going through the connection handshake. 122 request.init_time ||= @init_time unless open? 123 124 super 125 end