Documentation
¶
Index ¶
- func RenderJSON(snapshots []Snapshot) (string, error)
- func RenderTerminal(snapshots []Snapshot) string
- func Sparkline(values []float64) string
- func SparklineInt(values []int) string
- func Store(dir string, snap Snapshot) error
- func TrendArrow(d Delta) string
- type ContributorSnap
- type Delta
- type RenderOptions
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderJSON ¶
func RenderTerminal ¶
func SparklineInt ¶
func TrendArrow ¶
Types ¶
type ContributorSnap ¶
type Delta ¶
func ComputeDelta ¶
type RenderOptions ¶
type RenderOptions struct {
Count int
}
type Snapshot ¶
type Snapshot struct {
Version string `json:"version"`
Date string `json:"date"`
TotalCommits int `json:"total_commits"`
TotalAuthors int `json:"total_authors"`
BreakingChanges int `json:"breaking_changes"`
ReleaseContributionConcentration int `json:"release_contribution_concentration"`
ReleaseCommitSpanHours float64 `json:"release_commit_span_hours"`
ReleaseAgeHours float64 `json:"release_age_hours"`
CommitsPerDay float64 `json:"commits_per_day"`
ConventionalRatio float64 `json:"conventional_ratio"`
OwnershipEntropy float64 `json:"ownership_entropy"`
OwnershipConc float64 `json:"ownership_conc"`
TechDebtUSD float64 `json:"tech_debt_usd"`
HotspotScore float64 `json:"hotspot_score"`
HotspotDensity float64 `json:"hotspot_density"`
ReleaseRiskScore float64 `json:"release_risk_score"`
NetLines int `json:"net_lines"`
LinesAdded int `json:"lines_added"`
LinesDeleted int `json:"lines_deleted"`
FilesTouched int `json:"files_touched"`
JiraTickets int `json:"jira_tickets"`
ChurnFactor float64 `json:"churn_factor"`
ComplexityPerFeat float64 `json:"complexity_per_feat"`
FixToFeatureRatio float64 `json:"fix_to_feature_ratio"`
TestToSourceRatio float64 `json:"test_to_source_ratio"`
RefactoringRatio float64 `json:"refactoring_ratio"`
APISurfaceChange int `json:"api_surface_change"`
BatchFactor float64 `json:"batch_factor"`
RevertRate float64 `json:"revert_rate"`
ScopeIsolation float64 `json:"scope_isolation"`
CrossCuttingPct float64 `json:"cross_cutting_pct"`
FileVolatility float64 `json:"file_volatility"`
ChangeComplexityProxy float64 `json:"change_complexity_proxy"`
CrossCuttingChangeRisk float64 `json:"cross_cutting_change_risk"`
TouchedTestFileRatio float64 `json:"touched_test_file_ratio"`
CommitSizeSmall int `json:"commit_size_small"`
CommitSizeMedium int `json:"commit_size_medium"`
CommitSizeLarge int `json:"commit_size_large"`
CommitSizeHuge int `json:"commit_size_huge"`
ReviewLoad float64 `json:"review_load"`
DeleteRatio float64 `json:"delete_ratio"`
CommitMsgQuality float64 `json:"commit_msg_quality"`
AuthorOverlap float64 `json:"author_overlap"`
PeakHourSpread float64 `json:"peak_hour_spread"`
DirectoryBreadth float64 `json:"directory_breadth"`
ConfigChurnRate float64 `json:"config_churn_rate"`
CodeFreshness float64 `json:"code_freshness"`
RhythmConsistency float64 `json:"rhythm_consistency"`
ReleaseCadenceDays int `json:"release_cadence_days"`
DepUpdateFreq float64 `json:"dep_update_freq"`
LanguageMix float64 `json:"language_mix"`
TypeCounts map[string]int `json:"type_counts"`
SignificanceCounts map[string]int `json:"significance_counts"`
TopContributors []ContributorSnap `json:"top_contributors"`
// Read-only compatibility for snapshots written before proxy metrics were
// named honestly. New snapshots omit these fields.
LegacyBusFactor int `json:"bus_factor,omitempty"`
LegacyCycleTimeHours float64 `json:"cycle_time_hours,omitempty"`
LegacyCognitiveComplexity float64 `json:"cognitive_complexity,omitempty"`
LegacyCyclicDependencyRisk float64 `json:"cyclic_dependency_risk,omitempty"`
LegacyTestCoverageNewCode float64 `json:"test_coverage_new_code,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.