metrics

package
v0.0.0-...-1e95ff8 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeFailureRate

func ChangeFailureRate(ctx context.Context, dataflowID primitive.ObjectID, startDate time.Time, endDate time.Time, window int) (*models.ChangeFailureRate, error)

ChangeFailureRate calculates the change failure rate for a specific dataflow.

func CompleteChangesPerDays

func CompleteChangesPerDays(changesPerDays *[]models.ChangesPerDay, dates *[]time.Time) (*[]int, *[]int, error)

CompleteChangesPerDays returns a slice of the number of changes per day, since provided ChangesPerDays only account for the dates that any changes were found.

func CompleteIncidentsPerDays

func CompleteIncidentsPerDays(incidentsPerDays *[]models.IncidentsPerDay, dates *[]time.Time) (*[]int, *[]int, error)

CompleteIncidentsPerDays returns a slice of the number of incidents per day, since provided IncidentsPerDays only account for the dates that any incidents were found.

func CompletePipelineRunsPerDays

func CompletePipelineRunsPerDays(pipelineRunsPerDays *[]models.PipelineRunsPerDay, dates *[]time.Time) (*[]int, error)

CompletePipelineRunsPerDays returns a slice of the number of pipeline runs per day, since provided PipelineRunsPerDays only account for the dates that any pipeline runs were found.

func DatesBetween

func DatesBetween(startDate time.Time, endDate time.Time) (*[]time.Time, error)

DatesBetween returns a slice of dates between the start and end dates.

func DeploymentFrequency

func DeploymentFrequency(ctx context.Context, dataflowID primitive.ObjectID, startDate time.Time, endDate time.Time, window int) (*models.DeploymentFrequency, error)

DeploymentFrequency calculates the deployment frequency for a specific dataflow.

func GeneralChangeFailureRate

func GeneralChangeFailureRate(ctx context.Context, startDate time.Time, endDate time.Time, window int) (*models.GeneralChangeFailureRate, error)

GeneralChangeFailureRate calculates the general change failure rate over all dataflows.

func GeneralDeploymentFrequency

func GeneralDeploymentFrequency(ctx context.Context, startDate time.Time, endDate time.Time, window int) (*models.GeneralDeploymentFrequency, error)

GeneralDeploymentFrequency calculates the general deployment frequency over all dataflows.

func GeneralLeadTimeForChanges

func GeneralLeadTimeForChanges(ctx context.Context, startDate time.Time, endDate time.Time, window int) (*models.GeneralLeadTimeForChanges, error)

GeneralLeadTimeForChanges calculates the general lead time for changes over all dataflows.

func GeneralMeanTimeToRestore

func GeneralMeanTimeToRestore(ctx context.Context, startDate time.Time, endDate time.Time, window int) (*models.GeneralMeanTimeToRestore, error)

GeneralMeanTimeToRestore calculates the general mean time to restore over all dataflows.

func LeadTimeForChanges

func LeadTimeForChanges(ctx context.Context, dataflowID primitive.ObjectID, startDate time.Time, endDate time.Time, window int) (*models.LeadTimeForChanges, error)

LeadTimeForChanges calculates the lead time for changes for a specific dataflow.

func MeanTimeToRestore

func MeanTimeToRestore(ctx context.Context, dataflowID primitive.ObjectID, startDate time.Time, endDate time.Time, window int) (*models.MeanTimeToRestore, error)

MeanTimeToRestore calculates the mean time to restore for a specific dataflow.

func MovingAverages

func MovingAverages(totals *[]int, window int) (*[]float64, error)

MovingAverages calculates the moving averages for a given slice of totals.

func MovingAveragesRatio

func MovingAveragesRatio(numerators *[]int, denominators *[]int, window int) (*[]float64, error)

MovingAveragesRatio calculates the moving averages for a given two slices of totals.

Types

This section is empty.

Jump to

Keyboard shortcuts

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