utils

package
v1.0.0-alpha6 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcAvgProcessingTime

func CalcAvgProcessingTime(processes []*core.Process) float64

func CalcAvgWaitingTime

func CalcAvgWaitingTime(processes []*core.Process) float64

func CalcRetries

func CalcRetries(processes []*core.Process) int

func CalcUtilization

func CalcUtilization(processes []*core.Process) float64

This function assumes that the processes are sorted so that the oldest process is at index 0

func Compress

func Compress(rootDir string, src string, buf io.Writer) error

func CreateTestColonyWithKey

func CreateTestColonyWithKey() (*core.Colony, string, error)

func CreateTestProcess

func CreateTestProcess(colonyID string) *core.Process

func CreateTestProcessSpec

func CreateTestProcessSpec(colonyID string) *core.ProcessSpec

func CreateTestProcessSpecWithEnv

func CreateTestProcessSpecWithEnv(colonyID string, env map[string]string) *core.ProcessSpec

func CreateTestProcessSpecWithTargets

func CreateTestProcessSpecWithTargets(colonyID string, targetRuntimeIDs []string) *core.ProcessSpec

func CreateTestProcessSpecWithType

func CreateTestProcessSpecWithType(colonyID string, runtimeType string) *core.ProcessSpec

func CreateTestProcessWithEnv

func CreateTestProcessWithEnv(colonyID string, env map[string]string) *core.Process

func CreateTestProcessWithTargets

func CreateTestProcessWithTargets(colonyID string, targetRuntimeIDs []string) *core.Process

func CreateTestProcessWithType

func CreateTestProcessWithType(colonyID string, runtimeType string) *core.Process

func CreateTestRuntime

func CreateTestRuntime(colonyID string) *core.Runtime

func CreateTestRuntimeWithID

func CreateTestRuntimeWithID(colonyID string, runtimeID string) *core.Runtime

func CreateTestRuntimeWithKey

func CreateTestRuntimeWithKey(colonyID string) (*core.Runtime, string, error)

func CreateTestRuntimeWithType

func CreateTestRuntimeWithType(colonyID string, runtimeType string) *core.Runtime

func Decompress

func Decompress(src io.Reader, dst string) error

func FakeCron

func FakeCron(t *testing.T, colonyID string) *core.Cron

func FakeGenerator

func FakeGenerator(t *testing.T, colonyID string) *core.Generator

func FakeSingleCron

func FakeSingleCron(t *testing.T, colonyID string) *core.Cron

Types

This section is empty.

Jump to

Keyboard shortcuts

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