metrics

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchDeploymentStatus

func FetchDeploymentStatus(
	ctx context.Context, namespace, name string, duration time.Duration,
) <-chan DeploymentStatus

FetchDeploymentStatus creates a channel that can return the up-to-date DeploymentStatus periodically, selected via deployment name (at most one deployment).

func FetchDeploymentsStatus added in v0.11.0

func FetchDeploymentsStatus(
	ctx context.Context, namespace string, selector labels.Selector,
	duration time.Duration,
) <-chan DeploymentStatus

FetchDeploymentsStatus creates a channel that can return the up-to-date DeploymentStatus periodically, selected via a label selector (can be more than one deployment).

func FetchRouteStatus added in v0.20.0

func FetchRouteStatus(ctx context.Context, namespace, name string, duration time.Duration) <-chan RouteStatus

FetchRouteStatus returns a channel that will contain the traffic distribution at regular time intervals.

func FetchSKSStatus added in v0.15.0

func FetchSKSStatus(
	ctx context.Context, namespace string, selector labels.Selector,
	duration time.Duration,
) <-chan ServerlessServiceStatus

FetchSKSStatus 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
	DeploymentName  string
	// Time is the time when the status is fetched
	Time time.Time
}

DeploymentStatus is a struct that wraps the status of a deployment.

type RouteStatus added in v0.20.0

type RouteStatus struct {
	Traffic []v1.TrafficTarget
	Time    time.Time
}

RouteStatus contains the traffic distribution at the probe time.

type ServerlessServiceStatus

type ServerlessServiceStatus struct {
	Mode          netv1alpha1.ServerlessServiceOperationMode
	NumActivators int32
	// Time is the time when the status is fetched
	Time time.Time
}

ServerlessServiceStatus is a struct that wraps the status of a serverless service.

Jump to

Keyboard shortcuts

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