timing

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: EPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DevWorkspaceStarted denotes when a workspace was first started
	DevWorkspaceStarted = "controller.devfile.io/timing.started"
	// ComponentsCreated denotes when components were created for the workspace
	ComponentsCreated = "controller.devfile.io/timing.components.created"
	// ComponentsReady denotes when components were ready for the workspace
	ComponentsReady = "controller.devfile.io/timing.components.ready"
	// RoutingCreated denotes when the devworkspacerouting was created for the workspace
	RoutingCreated = "controller.devfile.io/timing.routing.created"
	// RoutingReady denotes when the devworkspacerouting was ready for the workspace
	RoutingReady = "controller.devfile.io/timing.routing.ready"
	// DeploymentCreated denotes when the deployment was created for the workspace
	DeploymentCreated = "controller.devfile.io/timing.deployment.created"
	// DeploymentReady denotes when the deployment was ready for the workspace
	DeploymentReady = "controller.devfile.io/timing.deployment.ready"
	// DevWorkspaceReady denotes when all health checks were completed and the workspace was ready
	DevWorkspaceReady = "controller.devfile.io/timing.ready"
)

Variables

This section is empty.

Functions

func ClearAnnotations

func ClearAnnotations(workspace *dw.DevWorkspace)

ClearAnnotations removes all timing-related annotations from a DevWorkspace. It's necessary to call this before setting new times via SetTime(), as SetTime() does not overwrite existing annotations.

func IsEnabled

func IsEnabled() bool

IsEnabled returns whether storing timing info is enabled for the operator

func SetTime

func SetTime(timingInfo map[string]string, event string)

SetTime applies a given event annotation to the devworkspace with the current timestamp. No-op if timing is disabled or the annotation is already set, meaning this function can be called without additional checks.

func SummarizeStartup

func SummarizeStartup(workspace *dw.DevWorkspace)

SummarizeStartup applies aggregate annotations based off event annotations set by SetTime(). No-op if timing is disabled or if not all event annotations are present on the devworkspace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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