benchmarks

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BENCHMARK_MAX_TIMEOUT    = 15 // 15 seconds, detect resource timeout
	BENCHMARK_MAX_TRIES      = 3  // times, maximum number of attempts
	BENCHMARK_DETECT_TIMEOUT = 3  // 3 seconds, for select fast mirror
)

Variables

This section is empty.

Functions

func Benchmark

func Benchmark(base string, query string, times int) (time.Duration, error)

func GetTheFastestMirror

func GetTheFastestMirror(mirrors []string, testUrl string) (string, error)

Types

type Result

type Result struct {
	URL      string
	Duration time.Duration
}

func ReadResults

func ReadResults(ch <-chan Result, size int) (br []Result, err error)

Jump to

Keyboard shortcuts

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