driver

package
v0.0.0-...-49965f9 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 34 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanAWSLambda

func CleanAWSLambda(functions []*common.Function)

CleanAWSLambda cleans up the AWS Lambda deployment environment by deleting all serverless.yml files and the ECR private repository

func CleanKnative

func CleanKnative()

func CleanOpenWhisk

func CleanOpenWhisk(functions []*common.Function)

func CleanServerless

func CleanServerless(index int) bool

CleanServerless removes the deployed service and deletes the serverless-<index>.yml file

func DAGCreation

func DAGCreation(functions []*common.Function) *list.List

func DeployDirigent

func DeployDirigent(functions []*common.Function)

func DeployFunctions

func DeployFunctions(functions []*common.Function, yamlPath string, isPartiallyPanic bool, endpointPort int, autoscalingMetric string)

func DeployFunctionsAWSLambda

func DeployFunctionsAWSLambda(functions []*common.Function)

DeployFunctionsAWSLambda deploys functions to AWS Lambda using the Serverless.com framework, with additional dependencies on AWS CLI, Docker

func DeployFunctionsOpenWhisk

func DeployFunctionsOpenWhisk(functions []*common.Function)

func DeployServerless

func DeployServerless(index int) map[int]string

DeployServerless deploys the functions defined in the serverless.com file and returns a map from function name to URL

func InvokeAWSLambda

func InvokeAWSLambda(function *common.Function, runtimeSpec *common.RuntimeSpecification, AnnounceDoneExe *sync.WaitGroup) (bool, *mc.ExecutionRecord)

func InvokeDirigent

func InvokeDirigent(function *common.Function, runtimeSpec *common.RuntimeSpecification, cfg *config.LoaderConfiguration) (bool, *mc.ExecutionRecord)

func InvokeGRPC

func InvokeGRPC(function *common.Function, runtimeSpec *common.RuntimeSpecification, cfg *config.LoaderConfiguration) (bool, *mc.ExecutionRecord)

func InvokeOpenWhisk

func InvokeOpenWhisk(function *common.Function, runtimeSpec *common.RuntimeSpecification, AnnounceDoneExe *sync.WaitGroup, ReadOpenWhiskMetadata *sync.Mutex) (bool, *mc.ExecutionRecord)

Types

type ActivationMetadata

type ActivationMetadata struct {
	Duration  uint32 //ms
	StartType mc.StartType
	WaitTime  int64 //ms
	InitTime  int64 //ms
}

type Driver

type Driver struct {
	Configuration          *DriverConfiguration
	SpecificationGenerator *generator.SpecificationGenerator
}

func NewDriver

func NewDriver(driverConfig *DriverConfiguration) *Driver

func (*Driver) CreateMetricsScrapper

func (d *Driver) CreateMetricsScrapper(interval time.Duration,
	signalReady *sync.WaitGroup, finishCh chan int, allRecordsWritten *sync.WaitGroup) func()

func (*Driver) RunExperiment

func (d *Driver) RunExperiment(iatOnly bool, generated bool)

type DriverConfiguration

type DriverConfiguration struct {
	LoaderConfiguration *config.LoaderConfiguration
	IATDistribution     common.IatDistribution
	ShiftIAT            bool // shift the invocations inside minute
	TraceGranularity    common.TraceGranularity
	TraceDuration       int // in minutes

	YAMLPath string
	TestMode bool

	Functions []*common.Function
}

func (*DriverConfiguration) WithWarmup

func (c *DriverConfiguration) WithWarmup() bool

type FunctionResponse

type FunctionResponse struct {
	Status        string `json:"Status"`
	MachineName   string `json:"MachineName"`
	ExecutionTime int64  `json:"ExecutionTime"`
}

type HTTPResBody

type HTTPResBody struct {
	DurationInMicroSec uint32 `json:"DurationInMicroSec"`
	MemoryUsageInKb    uint32 `json:"MemoryUsageInKb"`
}

type InvocationMetadata

type InvocationMetadata struct {
	RootFunction *list.List
	Phase        common.ExperimentPhase

	MinuteIndex     int
	InvocationIndex int

	SuccessCount        *int64
	FailedCount         *int64
	FailedCountByMinute []int64

	RecordOutputChannel   chan interface{}
	AnnounceDoneWG        *sync.WaitGroup
	AnnounceDoneExe       *sync.WaitGroup
	ReadOpenWhiskMetadata *sync.Mutex
}

type Serverless

type Serverless struct {
	Service          string                  `yaml:"service"`
	FrameworkVersion string                  `yaml:"frameworkVersion"`
	Provider         slsProvider             `yaml:"provider"`
	Package          slsPackage              `yaml:"package,omitempty"`
	Functions        map[string]*slsFunction `yaml:"functions"`
}

Serverless describes the serverless.yml contents.

func (*Serverless) AddFunctionConfig

func (s *Serverless) AddFunctionConfig(function *common.Function, provider string, awsAccountId string)

AddFunctionConfig adds the function configuration for serverless.com deployment

func (*Serverless) AddPackagePattern

func (s *Serverless) AddPackagePattern(pattern string)

AddPackagePattern adds a string pattern to Package.Pattern as long as such a pattern does not already exist in Package.Pattern

func (*Serverless) CreateHeader

func (s *Serverless) CreateHeader(index int, provider string)

CreateHeader sets the fields Service, FrameworkVersion, and Provider

func (*Serverless) CreateServerlessConfigFile

func (s *Serverless) CreateServerlessConfigFile(index int)

CreateServerlessConfigFile dumps the contents of the Serverless struct into a yml file (serverless-<index>.yml)

Jump to

Keyboard shortcuts

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