luci: go.chromium.org/luci/gce/appengine/backend/internal/metrics Index | Files

package metrics

import "go.chromium.org/luci/gce/appengine/backend/internal/metrics"

Package metrics includes tsmon metric support.

Index

Package Files

doc.go failures.go instances.go quota.go tasks.go

func UpdateFailures Uses

func UpdateFailures(c context.Context, code int, vm *model.VM)

UpdateFailures increments failure counters.

func UpdateQuota Uses

func UpdateQuota(c context.Context, limit, usage float64, metric, project, region string)

UpdateQuota sets GCE quota metrics.

type InstanceCount Uses

type InstanceCount struct {

    // ID is the unique identifier for this count.
    ID  string `gae:"$id"`
    // Prefix is the prefix for this count.
    Prefix string `gae:"prefix"`
    // Computed is the time this count was computed.
    Computed time.Time `gae:"computed"`
    // Configured is a slice of configuredCounts.
    Configured []configuredCount `gae:"configured,noindex"`
    // Connected is a slice of connectedCounts.
    Connected []connectedCount `gae:"connected,noindex"`
    // Created is a slice of createdCounts.
    Created []createdCount `gae:"created,noindex"`
    // contains filtered or unexported fields
}

InstanceCount is a root entity representing a count for instances with a common prefix.

func (*InstanceCount) AddConfigured Uses

func (ic *InstanceCount) AddConfigured(n int, project string)

AddConfigured increments the count of configured VMs for the given project.

func (*InstanceCount) AddConnected Uses

func (ic *InstanceCount) AddConnected(n int, project, server, zone string)

AddConnected increments the count of connected VMs for the given project, server, and zone.

func (*InstanceCount) AddCreated Uses

func (ic *InstanceCount) AddCreated(n int, project, zone string)

AddCreated increments the count of created VMs for the given project and zone.

func (*InstanceCount) Update Uses

func (ic *InstanceCount) Update(c context.Context, prefix string) error

Update updates metrics for all known counts of VMs for the given prefix.

type TaskCount Uses

type TaskCount struct {

    // ID is the unique identifier for this count.
    ID  string `gae:"$id"`
    // Queue is the task queue for this count.
    Queue string `gae:"queue"`
    // Computed is the time this count was computed.
    Computed time.Time `gae:"computed"`
    // Executing is a count of currently executing tasks.
    Executing int `gae:"executing,noindex"`
    // Total is a count of the total number of tasks in the queue.
    Total int `gae:"pending,noindex"`
    // contains filtered or unexported fields
}

TaskCount is a root entity representing a count of task queue tasks.

func (*TaskCount) Update Uses

func (tc *TaskCount) Update(c context.Context, queue string, exec, tot int) error

Update updates metrics for counts of tasks for the given queue.

Package metrics imports 10 packages (graph) and is imported by 1 packages. Updated 2019-05-23. Refresh now. Tools for package owners.