insight

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationCounts

type ApplicationCounts struct {
	Counts    []model.InsightApplicationCount `json:"counts"`
	UpdatedAt int64                           `json:"updated_at"`
}

func MakeApplicationCounts

func MakeApplicationCounts(apps []*model.Application, now time.Time) ApplicationCounts

type ChangeFailureRate

type ChangeFailureRate struct {
	Timestamp    int64   `json:"timestamp"`
	Rate         float32 `json:"rate"`
	SuccessCount int64   `json:"success_count"`
	FailureCount int64   `json:"failure_count"`
}

ChangeFailureRate represents a data point that shows the change failure rate metrics.

func (*ChangeFailureRate) GetTimestamp

func (c *ChangeFailureRate) GetTimestamp() int64

func (*ChangeFailureRate) Merge

func (c *ChangeFailureRate) Merge(point DataPoint) error

func (*ChangeFailureRate) Value

func (c *ChangeFailureRate) Value() float32

type DataPoint

type DataPoint interface {
	// Value gets data for model.InsightDataPoint.
	Value() float32
	// Timestamp gets timestamp.
	GetTimestamp() int64
	// Merge merges other DataPoint.
	Merge(point DataPoint) error
}

func ToDataPoints

func ToDataPoints(i interface{}) ([]DataPoint, error)

ToDataPoints converts a list of concrete points into the list of DataPoints

func UpdateDataPoint

func UpdateDataPoint(dp []DataPoint, point DataPoint, timestamp int64) ([]DataPoint, error)

UpdateDataPoint sets data point

type DeployFrequency

type DeployFrequency struct {
	Timestamp   int64   `json:"timestamp"`
	DeployCount float32 `json:"deploy_count"`
}

DeployFrequency represents a data point that shows the deployment frequency metrics.

func (*DeployFrequency) GetTimestamp

func (d *DeployFrequency) GetTimestamp() int64

func (*DeployFrequency) Merge

func (d *DeployFrequency) Merge(point DataPoint) error

func (*DeployFrequency) Value

func (d *DeployFrequency) Value() float32

type Milestone

type Milestone struct {
	// Mark that our collector has handled all
	// deployment that was created before this value
	DeploymentCreatedAtMilestone int64 `json:"deployment_created_at_milestone"`
	// Mark that our collector has handled all deployment
	// that was completed before this value. This will be
	// used while calculating CHANGE_FAILURE_RATE.
	DeploymentCompletedAtMilestone int64 `json:"deployment_completed_at_milestone"`
}

Directories

Path Synopsis
insightstoretest
Package insightstoretest is a generated GoMock package.
Package insightstoretest is a generated GoMock package.

Jump to

Keyboard shortcuts

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