perf

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package perf contains performance client.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client - client for performance testing.

func NewClient

func NewClient(logger logr.Logger, cfg *Config) (*Client, error)

NewClient creates new client for performance tests.

func (*Client) Quit

func (p *Client) Quit()

Quit terminates perf client gracefully.

func (*Client) Run

func (p *Client) Run() error

Run starts load session.

type Config

type Config struct {
	// Endpoint server address
	Endpoint string `json:"endpoint"`
	// RPS - target load [issued requests per second]
	RPS rate.Limit `json:"rps"`
	// LoadDuration - duration of the performance test session
	LoadDuration duration.Duration `json:"load_duration"`
	// AllocationSize - the size of allocations made on the server side during each request
	AllocationSize bytes.Bytes `json:"allocation_size"`
	// PauseDuration - duration of the pause in the request handler
	// on the server-side (to help allocations reside in server memory for a long time).
	PauseDuration duration.Duration `json:"pause_duration"`
	// RequestTimeout - server request timeout
	RequestTimeout duration.Duration `json:"request_timeout"`
}

Config - performance client configuration.

func (*Config) Prepare

func (c *Config) Prepare() error

Prepare validates configuration.

Jump to

Keyboard shortcuts

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