utils

package
v1.5.2-beta1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 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 CreateTestExecutor added in v1.0.1

func CreateTestExecutor(colonyID string) *core.Executor

func CreateTestExecutorWithID added in v1.0.1

func CreateTestExecutorWithID(colonyID string, executorID string) *core.Executor

func CreateTestExecutorWithKey added in v1.0.1

func CreateTestExecutorWithKey(colonyID string) (*core.Executor, string, error)

func CreateTestExecutorWithType added in v1.0.1

func CreateTestExecutorWithType(colonyID string, executorType string) *core.Executor

func CreateTestFile added in v1.5.0

func CreateTestFile(colonyID string) *core.File

func CreateTestFileWithID added in v1.5.0

func CreateTestFileWithID(id string, colonyID string, now time.Time) *core.File

func CreateTestFunctionSpec added in v1.0.1

func CreateTestFunctionSpec(colonyID string) *core.FunctionSpec

func CreateTestFunctionSpecWithEnv added in v1.0.1

func CreateTestFunctionSpecWithEnv(colonyID string, env map[string]string) *core.FunctionSpec

func CreateTestFunctionSpecWithTargets added in v1.0.1

func CreateTestFunctionSpecWithTargets(colonyID string, targetExecutorIDs []string) *core.FunctionSpec

func CreateTestFunctionSpecWithType added in v1.0.1

func CreateTestFunctionSpecWithType(colonyID string, executorType string) *core.FunctionSpec

func CreateTestProcess

func CreateTestProcess(colonyID string) *core.Process

func CreateTestProcessWithEnv

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

func CreateTestProcessWithTargets

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

func CreateTestProcessWithType

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

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 FakeGeneratorSingleProcess

func FakeGeneratorSingleProcess(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