httppconntime

package module
v0.0.0-...-dea7197 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2019 License: MIT Imports: 7 Imported by: 0

README

httppconntime

httppconntime is detect HTTP persistent connection time(keep-alive time).

Installation

go get github.com/kjmkznr/httppconntime/cmd/httppconntime/

Usage

Detect keep-alive time between 60s and 300s.

$ httppconntime -url http://localhost:8080/ -init 60s -max 300s
2019/09/14 07:57:55 Start probe HTTP Persistent Connection Time, between 1s and 12s
2019/09/14 07:57:55 Probe 0s - 6s
2019/09/14 07:58:01 Probe 6s - 3s
2019/09/14 07:58:04 Probe 3s - 4s
2019/09/14 07:58:08 Probe 4s - 5s
2019/09/14 07:58:13 HTTP Persistent Connection Time(KeepAlive Time) = 5s

CLI Options

  -init duration
        Initial wait time (default 1s)
  -max duration
        Max wait time (default 5m0s)
  -url string
        Target URL. like http://www.example.jp/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Probe

type Probe struct {
	// contains filtered or unexported fields
}

func NewProbe

func NewProbe(initialTime, maxTime time.Duration, logger *log.Logger) *Probe

func (*Probe) Do

func (p *Probe) Do(targetURL string) (time.Duration, error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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