{"modulePath":"github.com/devfile/devworkspace-operator","version":"v0.19.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package timing\n\n## Constants\n\n```go\nconst (\n\t// DevWorkspaceStarted denotes when a workspace was first started\n\tDevWorkspaceStarted = \"controller.devfile.io/timing.started\"\n\t// ComponentsCreated denotes when components were created for the workspace\n\tComponentsCreated = \"controller.devfile.io/timing.components.created\"\n\t// ComponentsReady denotes when components were ready for the workspace\n\tComponentsReady = \"controller.devfile.io/timing.components.ready\"\n\t// RoutingCreated denotes when the devworkspacerouting was created for the workspace\n\tRoutingCreated = \"controller.devfile.io/timing.routing.created\"\n\t// RoutingReady denotes when the devworkspacerouting was ready for the workspace\n\tRoutingReady = \"controller.devfile.io/timing.routing.ready\"\n\t// DeploymentCreated denotes when the deployment was created for the workspace\n\tDeploymentCreated = \"controller.devfile.io/timing.deployment.created\"\n\t// DeploymentReady denotes when the deployment was ready for the workspace\n\tDeploymentReady = \"controller.devfile.io/timing.deployment.ready\"\n\t// DevWorkspaceReady denotes when all health checks were completed and the workspace was ready\n\tDevWorkspaceReady = \"controller.devfile.io/timing.ready\"\n)\n```\n\n## Functions\n\n```go\nfunc ClearAnnotations(workspace *common.DevWorkspaceWithConfig)\n```\nClearAnnotations 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.\n\n```go\nfunc CurrentTime() string\n```\n\n```go\nfunc IsEnabled() bool\n```\nIsEnabled returns whether storing timing info is enabled for the operator\n\n```go\nfunc SetTime(timingInfo map[string]string, event string)\n```\nSetTime 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.\n\n```go\nfunc SummarizeStartup(workspace *common.DevWorkspaceWithConfig)\n```\nSummarizeStartup 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.\n\n","path":"github.com/devfile/devworkspace-operator/pkg/timing","name":"timing","synopsis":"","isRedistributable":true}
