helpers

package
v0.0.0-...-fa18c62 Latest Latest
Warning

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

Go to latest
Published: May 6, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAliveContainers

func CreateAliveContainers(client *docker.Client, num int) []string

CreateAliveContainers creates num of containers and also starts them

func CreateContainers

func CreateContainers(client *docker.Client, num int) []string

CreateContainers creates num of containers

func CreateDeadContainers

func CreateDeadContainers(client *docker.Client, num int) []string

CreateDeadContainers creates num of containers but not starts them

func DoInspectContainerBenchmark

func DoInspectContainerBenchmark(client *docker.Client, interval, testPeriod time.Duration, containerIDs []string) []int

DoInspectContainerBenchmark does periodically InspectContainer with specific interval, returns latencies of all the calls in nanoseconds

func DoListContainerBenchmark

func DoListContainerBenchmark(client *docker.Client, interval, testPeriod time.Duration, listAll bool) []int

DoListContainerBenchmark does periodically ListContainers with specific interval, returns latencies of all the calls in nanoseconds

func DoParallelContainerStartBenchmark

func DoParallelContainerStartBenchmark(client *docker.Client, qps float64, testPeriod time.Duration, routineNumber int) []int

DoParallelContainerStartBenchmark starts routineNumber of goroutines and let them start containers, returns latencies of all the starting calls in nanoseconds. There is a global rate limit on starting calls per second.

func DoParallelContainerStopBenchmark

func DoParallelContainerStopBenchmark(client *docker.Client, qps float64, routineNumber int) []int

DoParallelContainerStopBenchmark starts routineNumber of goroutines and let them stop containers, returns latencies of all the stopping calls in nanoseconds. There is a global rate limit on stopping calls per second.

func DoParallelInspectContainerBenchmark

func DoParallelInspectContainerBenchmark(client *docker.Client, interval, testPeriod time.Duration, routineNumber int, containerIDs []string) []int

DoParallelInspectContainerBenchmark starts routineNumber of goroutines and let them do DoInspectContainerBenchmark, returns latencies of all the calls in nanoseconds

func DoParallelListContainerBenchmark

func DoParallelListContainerBenchmark(client *docker.Client, interval, testPeriod time.Duration, routineNumber int, all bool) []int

DoParallelListContainerBenchmark starts routineNumber of goroutines and let them do DoListContainerBenchmark, returns latencies of all the calls in nanoseconds

func Ftoas

func Ftoas(nums ...float64) []string

Ftoas converts float64 numbers to a slice of string

func GetContainerIDs

func GetContainerIDs(client *docker.Client) (containerIDs []string)

GetContainerIDs returns all the container ids in the system

func GetContainerNum

func GetContainerNum(client *docker.Client, all bool) int

GetContainerNum returns container number in the system

func Itoas

func Itoas(nums ...int) []string

Itoas converts int numbers to a slice of string

func LogEVar

func LogEVar(vars map[string]interface{})

LogEVar prints all the environemnt variables

func LogLabels

func LogLabels(labels ...string)

LogLabels prints the labels of the result table

func LogResult

func LogResult(latencies []int, variables ...string)

LogResult prints the item of the result table

func LogTitle

func LogTitle(title string)

LogTitle prints an empty line and the title of the benchmark

func RemoveContainers

func RemoveContainers(client *docker.Client, ids []string)

RemoveContainers removes all the containers in ids slice

func StartContainers

func StartContainers(client *docker.Client, ids []string)

StartContainers starts all the containers in ids slice

func StopContainers

func StopContainers(client *docker.Client, ids []string)

StopContainers stops all the containers in ids slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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