service

package
v0.0.0-...-52bff85 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNamespace = "default"
	ServiceImage     = "gcr.io/knative-samples/helloworld-go"
)
View Source
const (
	DateFormatString         = "20060102150405"
	RawMeasureOutputFilename = "raw_ksvc_creation_time"
	MeasureOutputFilename    = "ksvc_creation_time"
)
View Source
const (
	OutputFilename = "ksvc_scaling_time"
	InitialScale   = "0"
)
View Source
const (
	LoadOutputFilename = "ksvc_loading_time"
)

Variables

This section is empty.

Functions

func CleanServices

func CleanServices(params *pkg.PerfParams, inputs pkg.CleanArgs) error

CleanServices used to clean Knative Service workload

func GenerateCSVOutput

func GenerateCSVOutput(rows [][]string, outputPathPrefix string) (csvPath string, err error)

GenerateCSVOutput generates CSV file from the rows data

func GenerateHTMLOutput

func GenerateHTMLOutput(csvPath string, outputPathPrefix string) (htmlPath string, err error)

GenerateHTMLOutput generates HTML file from CSV file

func GenerateJSONOutput

func GenerateJSONOutput(result interface{}, outputPathPrefix string) (jsonPath string, err error)

GenerateJSONOutput generates JSON output from the result

func GenerateOutput

func GenerateOutput(inputsOutput string, outputFilenameFlag string, csvFlag bool, htmlFlag bool, jsonFlag bool, rows [][]string, result interface{}) error

GenerateOutput generates outputs according to flags(csvFlag, htmlFlag and josnFlag) from rows and result

func GenerateOutputPathPrefix

func GenerateOutputPathPrefix(inputsOutput string, outputFilenameFlag string) (pathPrefix string, err error)

GenerateOutputPathPrefix generates the prefix of output path, which can be combined with a suffix name(.csv) to form a complete path

func GenerateServices

func GenerateServices(params *pkg.PerfParams, inputs pkg.GenerateArgs) error

GenerateServices used to generate Knative Service workload

func GetIngressController

func GetIngressController(p *pkg.PerfParams) map[string]string

Get Knative ingress controller solution and version Returns a map like {"ingressController":"Istio", "version":"1.7.3"} For now, kperf only support Istio. 1) If it is using Istio, get version from istio deployment labels in istio-system. 2) If it is using other options, put version as "Unknown".

func GetKnativeVersion

func GetKnativeVersion(p *pkg.PerfParams) map[string]string

Get Knative Serving and Eventing version Returns a map like {"eventing":"0.20.0", "serving":"0.20.0"}

func GetNamespaces

func GetNamespaces(ctx context.Context, params *pkg.PerfParams, namespace, namespaceRange, namespacePrefix string) ([]string, error)

func LoadServicesUpFromZero

func LoadServicesUpFromZero(params *pkg.PerfParams, inputs pkg.LoadArgs) error

func MeasureServices

func MeasureServices(params *pkg.PerfParams, inputs pkg.MeasureArgs, options MeasureServicesOptions) error

MeasureServices used to measure a Knative Service creation time running currently with 20 concurent jobs

func NewServiceCleanCommand

func NewServiceCleanCommand(p *pkg.PerfParams) *cobra.Command

func NewServiceCmd

func NewServiceCmd(p *pkg.PerfParams) *cobra.Command

domainCmd represents the domain command

func NewServiceGenerateCommand

func NewServiceGenerateCommand(p *pkg.PerfParams) *cobra.Command

func NewServiceLoadCommand

func NewServiceLoadCommand(p *pkg.PerfParams) *cobra.Command

func NewServiceMeasureCommand

func NewServiceMeasureCommand(p *pkg.PerfParams) *cobra.Command

func NewServiceScaleCommand

func NewServiceScaleCommand(p *pkg.PerfParams) *cobra.Command

func ScaleServicesUpFromZero

func ScaleServicesUpFromZero(params *pkg.PerfParams, inputs pkg.ScaleArgs) error

Types

type MeasureServicesOptions

type MeasureServicesOptions struct {
	NamespaceChanged       bool
	NamespaceRangeChanged  bool
	NamespacePrefixChanged bool
	VerboseChanged         bool
}

type Response

type Response struct {
	Status     string
	StatusCode int
	Header     http.Header
	Body       []byte
}

func Poll

func Poll(httpClient http.Client, request *http.Request, maxRetries int, requestInterval time.Duration, requestTimeout time.Duration, url string) (*Response, error)

type ServicesToScale

type ServicesToScale struct {
	Namespace string
	Service   *servingv1.Service
}

Jump to

Keyboard shortcuts

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