smasher

package
v0.13.0-a Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ts TestStruct, maxDos int32, testCases int, statDur time.Duration) error

Types

type Client

type Client interface {
	Do() error

	Sent() uint64
}

type H

type H interface {
	Do()
}

type Lambda

type Lambda struct {
	H    H
	F    uint64
	A    uint64
	AMax uint64
	// contains filtered or unexported fields
}

func (*Lambda) ServeHTTP

func (s *Lambda) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Lambda) Stats

func (s *Lambda) Stats() string

type Server

type Server interface {
	Stats() string
}

type Sleeper

type Sleeper struct {
	D time.Duration
}

func (*Sleeper) Do

func (s *Sleeper) Do()

type SocketPass

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

func New

func New(t *http.Transport) *SocketPass

func (*SocketPass) RoundTrip

func (sp *SocketPass) RoundTrip(q *http.Request) (*http.Response, error)

implement net/http.RoundTripper

func (*SocketPass) Write

func (sp *SocketPass) Write(p []byte) (n int, err error)

type TestStruct

type TestStruct struct {
	Server func() (Server, error)
	Client func() (Client, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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