metricscache

package
v2.24.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache holds the template metrics. The aggregation queries responsible for these values can take up to a minute on large deployments. Even in small deployments, aggregation queries can take a few hundred milliseconds, which would ruin page load times and database performance if in the hot path.

func New

func New(db database.Store, log slog.Logger, clock quartz.Clock, intervals Intervals, usage bool) *Cache

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) DeploymentStats

func (c *Cache) DeploymentStats() (codersdk.DeploymentStats, bool)

func (*Cache) TemplateBuildTimeStats

func (c *Cache) TemplateBuildTimeStats(id uuid.UUID) codersdk.TemplateBuildTimeStats

func (*Cache) TemplateWorkspaceOwners added in v2.5.0

func (c *Cache) TemplateWorkspaceOwners(id uuid.UUID) (int, bool)

type Intervals

type Intervals struct {
	TemplateBuildTimes time.Duration
	DeploymentStats    time.Duration
}

Jump to

Keyboard shortcuts

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

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy