metricscache
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- type Cache
- func (c *Cache) Close() error
- func (c *Cache) DeploymentDAUs(offset int) (int, *codersdk.DAUsResponse, bool)
- func (c *Cache) DeploymentStats() (codersdk.DeploymentStats, bool)
- func (c *Cache) TemplateBuildTimeStats(id uuid.UUID) codersdk.TemplateBuildTimeStats
- func (c *Cache) TemplateDAUs(id uuid.UUID, offset int) (int, *codersdk.DAUsResponse, bool)
- func (c *Cache) TemplateUniqueUsers(id uuid.UUID) (int, bool)
- type Intervals
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeCache¶
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 minuteon large deployments. Even in small deployments, aggregation queries cantake a few hundred milliseconds, which would ruin page load times anddatabase performance if in the hot path.
func (*Cache)DeploymentDAUs¶added inv0.15.3
func (*Cache)DeploymentStats¶added inv0.19.0
func (c *Cache) DeploymentStats() (codersdk.DeploymentStats,bool)
func (*Cache)TemplateBuildTimeStats¶added inv0.10.0
func (c *Cache) TemplateBuildTimeStats(iduuid.UUID)codersdk.TemplateBuildTimeStats
func (*Cache)TemplateDAUs¶
TemplateDAUs returns an empty response if the template doesn't have usersor is loading for the first time.The cache will select the closest DAUs response to given timezone offset.