analyze

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer encapsulates the analysis configuration and provides methods for various analyses.

func New

func New(config *config.Config) (*Analyzer, error)

New creates a new Analyzer instance with the provided configuration.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(events []data.Event) Metrics

Analyze computes all advanced metrics and analysis from the given events.

type Collaboration

type Collaboration struct {
	Reviewers []UserStat // People who reviewed me
	Reviewees []UserStat // People I reviewed
}

type Metrics

type Metrics struct {
	// Version
	Version string

	// Raw metrics
	RepoStats     RepoStats
	Theme         []Theme
	Collaboration Collaboration

	// Derived metrics
	PeriodStart     time.Time
	PeriodEnd       time.Time
	ImpactScore     float64            // Sum of action weights * theme weights
	Velocity        float64            // events per week
	OwnershipCount  int                // Number of repos with >= ownership threshold
	WeeklyTrend     []TrendPoint       // Number of events per week (ordered)
	ContributionMix map[string]float64 // Percentage of events per theme
}

Metrics are advanced metrics computed from events.

type RepoStats

type RepoStats struct {
	Summary []RepoSummary
}

type RepoSummary

type RepoSummary struct {
	Name     string
	Merged   int
	Issues   int
	Reviewed int
}

type Theme

type Theme struct {
	Name  string
	Count int
	Items []data.Event
}

type TrendPoint

type TrendPoint struct {
	Date  string
	Count int
}

TrendPoint represents activity count for a specific date.

type UserStat

type UserStat struct {
	Login string
	Count int
}

Jump to

Keyboard shortcuts

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