Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzePrs ¶
AnalyzePrs iterates through a slice of PrData, calculates metrics, and prints them.
Types ¶
type NormalDistributionEstimates ¶
type NormalDistributionEstimates struct {
Mean time.Duration
StdDev time.Duration
P50 time.Duration // 50th percentile (median)
P80 time.Duration // 80th percentile
P90 time.Duration // 90th percentile
P95 time.Duration // 95th percentile
SampleCount int
}
NormalDistributionEstimates holds percentile estimates for a given metric.
func EstimateTimesUsingNormalDistribution ¶
func EstimateTimesUsingNormalDistribution(metrics []*PrMetrics, selector func(*PrMetrics) time.Duration, metricName string) NormalDistributionEstimates
EstimateTimesUsingNormalDistribution calculates normal distribution-based estimates for a given time metric from a slice of PrMetrics. It takes a selector function to pick the duration from each PrMetrics object.
type PrMetrics ¶
type PrMetrics struct {
Number int
Title string
TimeToFirstReview time.Duration
TimeToMerge time.Duration
ReviewToMerge time.Duration
Additions int
Deletions int
ChangedFiles int
State string
}
PrMetrics holds calculated metrics for a single Pull Request.
func CalculateMetrics ¶
CalculateMetrics computes various time-based metrics for a single PR.
Click to show internal directories.
Click to hide internal directories.