profile

package
v0.0.0-...-5dad29e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Observe

func Observe(r *http.Request) *http.Request

Observe request

Types

type Report

type Report struct {
	// ConnectStart time when client start connection
	ConnectStart time.Time
	// ConnectDone time when connection has been established
	ConnectDone time.Time

	// DNSLookupStart begin of DNS lookup
	DNSLookupStart time.Time
	// DNSLookupDone end of DNS lookup
	DNSLookupDone time.Time

	// TLSHandshakeStart begin of TLS handshake
	TLSHandshakeStart time.Time
	// TLSHandshakeDone end of TLS handshake
	TLSHandshakeDone time.Time

	// Reused connection from connection pool (keep-alive)
	Reused bool
}

Report for single HTTP Request

func ReportFromResponse

func ReportFromResponse(response *http.Response) *Report

ReportFromResponse return report from response

func (*Report) ConnectionTime

func (r *Report) ConnectionTime() time.Duration

ConnectionTime time for establishing a connection

func (*Report) ConnectionTimeMs

func (r *Report) ConnectionTimeMs() float64

ConnectionTime time for establishing a connection in milliseconds

func (*Report) DNSLookupTime

func (r *Report) DNSLookupTime() time.Duration

DNSLookupTime time for DNS lookup

func (*Report) DNSLookupTimeMs

func (r *Report) DNSLookupTimeMs() float64

DNSLookupTime time for DNS lookup in milliseconds

func (*Report) TLSHandshakeTime

func (r *Report) TLSHandshakeTime() time.Duration

TLSHandshakeDuration time for TLSHandshake

func (*Report) TLSHandshakeTimeMs

func (r *Report) TLSHandshakeTimeMs() float64

TLSHandshakeTimeMs time for TLSHandshake in milliseconds

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL