Documentation
¶
Index ¶
- func FetchDeploymentStatus(ctx context.Context, namespace string, selector labels.Selector, ...) <-chan DeploymentStatus
- func FetchSKSMode(ctx context.Context, namespace string, selector labels.Selector, ...) <-chan ServerlessServiceStatus
- func HandleResult(q *quickstore.Quickstore, res vegeta.Result, latencyKey string, ...)
- type AggregateResult
- type DeploymentStatus
- type ServerlessServiceStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchDeploymentStatus ¶
func FetchDeploymentStatus( ctx context.Context, namespace string, selector labels.Selector, duration time.Duration, ) <-chan DeploymentStatus
FetchDeploymentStatus creates a channel that can return the up-to-date DeploymentStatus periodically.
func FetchSKSMode ¶
func FetchSKSMode( ctx context.Context, namespace string, selector labels.Selector, duration time.Duration, ) <-chan ServerlessServiceStatus
FetchSKSMode creates a channel that can return the up-to-date ServerlessServiceOperationMode periodically.
func HandleResult ¶ added in v0.10.0
func HandleResult(q *quickstore.Quickstore, res vegeta.Result, latencyKey string, ar *AggregateResult)
HandleResult will handle the attack result by: 1. Adding its latency as a sample point if no error, or adding it as an error if there is 2. Updating the aggregate results
Types ¶
type AggregateResult ¶ added in v0.10.0
type AggregateResult struct {
// ErrorRates is a map that saves the number of errors for each timestamp (in secs)
ErrorRates map[int64]int64
// RequestRates is a map that saves the number of requests for each timestamp (in secs)
RequestRates map[int64]int64
}
AggregateResult is the aggregated result of requests for better visualization.
func NewAggregateResult ¶ added in v0.10.0
func NewAggregateResult(initialSize int) *AggregateResult
NewAggregateResult returns the pointer of a new AggregateResult object.
type DeploymentStatus ¶
type DeploymentStatus struct {
DesiredReplicas int32
ReadyReplicas int32
// Time is the time when the status is fetched
Time time.Time
}
DeploymentStatus is a struct that wraps the status of a deployment.
type ServerlessServiceStatus ¶
type ServerlessServiceStatus struct {
Mode netv1alpha1.ServerlessServiceOperationMode
// Time is the time when the status is fetched
Time time.Time
}
ServerlessServiceStatus is a struct that wraps the status of a serverless service.