speedtests

package
v0.0.0-...-29aba68 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultDLSizes defines the default download sizes
	DefaultDLSizes = []int{350, 500, 750, 1000, 1500, 2000, 2500, 3000, 3500, 4000}
	// DefaultULSizes defines the default upload sizes
	DefaultULSizes = []int{int(0.25 * 1024 * 1024), int(0.5 * 1024 * 1024), int(1.0 * 1024 * 1024), int(1.5 * 1024 * 1024), int(2.0 * 1024 * 1024)}
)

Functions

This section is empty.

Types

type Tester

type Tester struct {
	Client   *sthttp.Client
	DLSizes  []int
	ULSizes  []int
	Quiet    bool
	Report   bool
	Debug    bool
	AlgoType string
}

Tester defines a Speedtester client tester

func NewTester

func NewTester(client *sthttp.Client, dlsizes []int, ulsizes []int, quiet bool, report bool) *Tester

NewTester creates a new Tester struct. should probably make this more conventional with a "make_tester" or similar

func (*Tester) Download

func (tester *Tester) Download(server sthttp.Server) float64

Download will perform the "normal" speedtest download test

func (*Tester) FindServer

func (tester *Tester) FindServer(id string, serversList []sthttp.Server) sthttp.Server

FindServer will find a specific server in the servers list

func (*Tester) ListServers

func (tester *Tester) ListServers(configURL string, serversURL string, blacklist []string) (err error)

ListServers prints a list of all "global" servers

func (*Tester) Upload

func (tester *Tester) Upload(server sthttp.Server) float64

Upload runs a "normal" speedtest upload test

Jump to

Keyboard shortcuts

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