cmd

package
v0.0.0-...-317aa01 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UserCreationTimeMaxPerThread         []time.Duration
	ApplicationCreationTimeMaxPerThread  []time.Duration
	ItsCreationTimeMaxPerThread          []time.Duration
	CDQCreationTimeMaxPerThread          []time.Duration
	ComponentCreationTimeMaxPerThread    []time.Duration
	PipelineRunSucceededTimeMaxPerThread []time.Duration

	DeploymentSucceededTimeMaxPerThread                  []time.Duration
	IntegrationTestsPipelineRunSucceededTimeMaxPerThread []time.Duration

	UserCreationTimeSumPerThread          []time.Duration
	ApplicationCreationTimeSumPerThread   []time.Duration
	ItsCreationTimeSumPerThread           []time.Duration
	CDQCreationTimeSumPerThread           []time.Duration
	ComponentCreationTimeSumPerThread     []time.Duration
	PipelineRunSucceededTimeSumPerThread  []time.Duration
	PipelineRunFailedTimeSumPerThread     []time.Duration
	PipelineRunWaitTimeForPVCSumPerThread []time.Duration

	DeploymentSucceededTimeSumPerThread                  []time.Duration
	DeploymentFailedTimeSumPerThread                     []time.Duration
	IntegrationTestsPipelineRunSucceededTimeSumPerThread []time.Duration
	IntegrationTestsPipelineRunFailedTimeSumPerThread    []time.Duration

	SuccessfulUserCreationsPerThread                []int64
	SuccessfulApplicationCreationsPerThread         []int64
	SuccessfulItsCreationsPerThread                 []int64
	SuccessfulCDQCreationsPerThread                 []int64
	SuccessfulComponentCreationsPerThread           []int64
	SuccessfulPipelineRunsPerThread                 []int64
	SuccessfulDeploymentsPerThread                  []int64
	SuccessfulIntegrationTestsPipelineRunsPerThread []int64
	SuccessfulPVCCreationsPerThread                 []int64

	FailedUserCreationsPerThread                []int64
	FailedApplicationCreationsPerThread         []int64
	FailedItsCreationsPerThread                 []int64
	FailedCDQCreationsPerThread                 []int64
	FailedComponentCreationsPerThread           []int64
	FailedPipelineRunsPerThread                 []int64
	FailedDeploymentsPerThread                  []int64
	FailedIntegrationTestsPipelineRunsPerThread []int64

	CI                bool
	JobName           string
	MetricsController *metrics.MetricsPush
)
View Source
var AppStudioUsersBar *uiprogress.Bar
View Source
var ApplicationsBar *uiprogress.Bar
View Source
var CDQsBar *uiprogress.Bar
View Source
var ComponentsBar *uiprogress.Bar
View Source
var DeploymentsBar *uiprogress.Bar
View Source
var IntegrationTestsPipelinesBar *uiprogress.Bar
View Source
var PipelinesBar *uiprogress.Bar

Functions

func CalculateActualCreationTimeInSeconds

func CalculateActualCreationTimeInSeconds(lastTransitionTime, creationTimestamp time.Time, creationTime time.Duration) float64

CalculateActualCreationTimeInSeconds calculates the adjusted creation time in seconds. Usage: applicationActualCreationTimeInSeconds := CalculateActualCreationTimeInSeconds(lastTransitionTime, creationTimestamp, applicationCreationTime)

func ExecuteLoadTest

func ExecuteLoadTest()

func MetricsWrapper

func MetricsWrapper(M *metrics.MetricsPush, collector string, metricType string, metric string, values ...float64)

func StageCleanup

func StageCleanup(users []loadtestUtils.User)

Types

type ApplicationSuccessHandler

type ApplicationSuccessHandler struct{}

func (ApplicationSuccessHandler) HandleSuccess

func (h ApplicationSuccessHandler) HandleSuccess(ctx *JourneyContext, appName string, timeInSeconds float64)

type BaseHandler

type BaseHandler struct {
	// contains filtered or unexported fields
}

func (*BaseHandler) Handle

func (h *BaseHandler) Handle(ctx *JourneyContext)

func (*BaseHandler) SetNext

func (h *BaseHandler) SetNext(handler Handler)

type CdqSuccessHandler

type CdqSuccessHandler struct{}

func (CdqSuccessHandler) HandleSuccess

func (h CdqSuccessHandler) HandleSuccess(ctx *JourneyContext, cdqName string, timeInSeconds float64)

type ComponentSuccessHandler

type ComponentSuccessHandler struct {
	Username string
}

func (ComponentSuccessHandler) HandleSuccess

func (h ComponentSuccessHandler) HandleSuccess(ctx *JourneyContext, componentName string, timeInSeconds float64)

type ConcreteHandlerDeployments

type ConcreteHandlerDeployments struct {
	BaseHandler
}

func (*ConcreteHandlerDeployments) Handle

type ConcreteHandlerItsPipelines

type ConcreteHandlerItsPipelines struct {
	ConcreteHandlerPipelines // Embedding ConcreteHandlerPipelines
}

func (*ConcreteHandlerItsPipelines) Handle

type ConcreteHandlerPipelines

type ConcreteHandlerPipelines struct {
	BaseHandler
}

func (*ConcreteHandlerPipelines) Handle

func (h *ConcreteHandlerPipelines) Handle(ctx *JourneyContext)

type ConcreteHandlerResources

type ConcreteHandlerResources struct {
	BaseHandler
}

func (*ConcreteHandlerResources) Handle

func (h *ConcreteHandlerResources) Handle(ctx *JourneyContext)

type ConcreteHandlerUsers

type ConcreteHandlerUsers struct {
	BaseHandler
}

func (*ConcreteHandlerUsers) Handle

func (h *ConcreteHandlerUsers) Handle(ctx *JourneyContext)

type ConditionDetails

type ConditionDetails struct {
	Type   string
	Status metav1.ConditionStatus
}

Define Structs for Grouping Parameters for "handleCondition" function to reduce number of parameters used

type CreationDetails

type CreationDetails struct {
	Timestamp time.Time
	Duration  time.Duration
}

type ErrorCount

type ErrorCount struct {
	ErrorCode int `json:"errorCode"`
	Count     int `json:"count"`
}

type ErrorOccurrence

type ErrorOccurrence struct {
	ErrorCode int    `json:"errorCode"`
	Message   string `json:"message"`
}

type Handler

type Handler interface {
	SetNext(handler Handler)
	Handle(ctx *JourneyContext)
}

type ItsSuccessHandler

type ItsSuccessHandler struct {
	Username string
}

func (ItsSuccessHandler) HandleSuccess

func (h ItsSuccessHandler) HandleSuccess(ctx *JourneyContext, itsName string, timeInSeconds float64)

type JourneyContext

type JourneyContext struct {
	FrameworkMap *sync.Map

	ThreadIndex                  int
	AppStudioUsersBar            *uiprogress.Bar
	ApplicationsBar              *uiprogress.Bar
	ItsBar                       *uiprogress.Bar
	CDQsBar                      *uiprogress.Bar
	ComponentsBar                *uiprogress.Bar
	PipelinesBar                 *uiprogress.Bar
	IntegrationTestsPipelinesBar *uiprogress.Bar
	DeploymentsBar               *uiprogress.Bar
	ChUsers                      chan string
	ChPipelines                  chan string
	ChIntegrationTestsPipelines  chan string
	ChDeployments                chan string
	// contains filtered or unexported fields
}

type LogData

type LogData struct {
	Timestamp                         string  `json:"timestamp"`
	EndTimestamp                      string  `json:"endTimestamp"`
	MachineName                       string  `json:"machineName"`
	BinaryDetails                     string  `json:"binaryDetails"`
	ComponentRepoUrl                  string  `json:"componentRepoUrl"`
	NumberOfThreads                   int     `json:"threads"`
	NumberOfUsersPerThread            int     `json:"usersPerThread"`
	NumberOfUsers                     int     `json:"totalUsers"`
	PipelineSkipInitialChecks         bool    `json:"pipelineSkipInitialChecks"`
	PipelineRequestConfigurePac       bool    `json:"pipelineRequestConfigurePac"`
	LoadTestCompletionStatus          string  `json:"status"`
	AverageTimeToSpinUpUsers          float64 `json:"createUserTimeAvg"`
	MaxTimeToSpinUpUsers              float64 `json:"createUserTimeMax"`
	AverageTimeToCreateApplications   float64 `json:"createApplicationsTimeAvg"`
	MaxTimeToCreateApplications       float64 `json:"createApplicationsTimeMax"`
	AverageTimeToCreateIts            float64 `json:"createItsTimeAvg"`
	MaxTimeToCreateIts                float64 `json:"createItsTimeMax"`
	AverageTimeToCreateCDQs           float64 `json:"createCDQsTimeAvg"`
	MaxTimeToCreateCDQs               float64 `json:"createCDQsTimeMax"`
	AverageTimeToCreateComponents     float64 `json:"createComponentsTimeAvg"`
	MaxTimeToCreateComponents         float64 `json:"createComponentsTimeMax"`
	AverageTimeToRunPipelineSucceeded float64 `json:"runPipelineSucceededTimeAvg"`
	MaxTimeToRunPipelineSucceeded     float64 `json:"runPipelineSucceededTimeMax"`
	AverageTimeToRunPipelineFailed    float64 `json:"runPipelineFailedTimeAvg"`
	AverageWaitTimeForPVCProvisioning float64 `json:"WaitTimeForPVCProvisioningAvg"`

	AverageTimeToDeploymentSucceeded float64 `json:"deploymentSucceededTimeAvg"`
	MaxTimeToDeploymentSucceeded     float64 `json:"deploymentSucceededTimeMax"`
	AverageTimeToDeploymentFailed    float64 `json:"deploymentFailedTimeAvg"`

	IntegrationTestsAverageTimeToRunPipelineSucceeded float64 `json:"integrationTestsRunPipelineSucceededTimeAvg"`
	IntegrationTestsMaxTimeToRunPipelineSucceeded     float64 `json:"integrationTestsRunPipelineSucceededTimeMax"`
	IntegrationTestsAverageTimeToRunPipelineFailed    float64 `json:"integrationTestsRunPipelineFailedTimeAvg"`

	UserCreationSuccessCount        int64   `json:"createUserSuccesses"`
	UserCreationFailureCount        int64   `json:"createUserFailures"`
	UserCreationFailureRate         float64 `json:"createUserFailureRate"`
	ApplicationCreationSuccessCount int64   `json:"createApplicationsSuccesses"`
	ApplicationCreationFailureCount int64   `json:"createApplicationsFailures"`
	ApplicationCreationFailureRate  float64 `json:"createApplicationsFailureRate"`
	ItsCreationSuccessCount         int64   `json:"createItsSuccesses"`
	ItsCreationFailureCount         int64   `json:"createItsFailures"`
	ItsCreationFailureRate          float64 `json:"createItsFailureRate"`
	CDQCreationSuccessCount         int64   `json:"createCDQsSuccesses"`
	CDQCreationFailureCount         int64   `json:"createCDQsFailures"`
	CDQCreationFailureRate          float64 `json:"createCDQsFailureRate"`
	ComponentCreationSuccessCount   int64   `json:"createComponentsSuccesses"`
	ComponentCreationFailureCount   int64   `json:"createComponentsFailures"`
	ComponentCreationFailureRate    float64 `json:"createComponentsFailureRate"`
	PipelineRunSuccessCount         int64   `json:"runPipelineSuccesses"`
	PipelineRunFailureCount         int64   `json:"runPipelineFailures"`
	PipelineRunFailureRate          float64 `json:"runPipelineFailureRate"`
	PVCCreationSuccessCount         int64   `json:"createPVCSuccesses"`

	DeploymentSuccessCount int64   `json:"deploymentSuccesses"`
	DeploymentFailureCount int64   `json:"deploymentFailures"`
	DeploymentFailureRate  float64 `json:"deploymentFailureRate"`

	IntegrationTestsPipelineRunSuccessCount int64   `json:"integrationTestsRunPipelineSuccesses"`
	IntegrationTestsPipelineRunFailureCount int64   `json:"integrationTestsRunPipelineFailures"`
	IntegrationTestsPipelineRunFailureRate  float64 `json:"integrationTestsRunPipelineFailureRate"`

	WorkloadKPI float64 `json:"workloadKPI"`

	ErrorCounts []ErrorCount      `json:"errorCounts"`
	Errors      []ErrorOccurrence `json:"errors"`
	ErrorsTotal int               `json:"errorsTotal"`
}

type SuccessHandler

type SuccessHandler interface {
	HandleSuccess(ctx *JourneyContext, name string, timeInSeconds float64)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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