analysis

package
v0.0.0-...-3d4bac1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BurndownResult

type BurndownResult struct {
	// Burndowns are matrices that represent each band's values at a particular
	// sampling size, which will be 30 * ticks (at least for now - see the
	// analysis class for more details). From what I understand, it's sort of like
	// this:
	//     time intervals (aka ticks) * bands (representing if code is still present)
	// Might be able to drop Global - TODO: assess if sum of files per band and tick
	// is equal to global.
	Global [][]int64
	People map[string][][]int64
	Files  map[string][][]int64
}

BurndownResult represents the burndown analysis result

type CouplingResult

type CouplingResult struct {
	FilesMatrix []map[int]int64
	FilesLines  []int
	Files       []string
}

CouplingResult represents the coupling analysis result

type GitRepoAnalyser

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

GitRepoAnalyser executes pipelines on a repo

func NewGitAnalyser

func NewGitAnalyser(
	l *zap.SugaredLogger,
	repo *gogit.Repository,
	opts GitRepoAnalyserOptions,
) (*GitRepoAnalyser, error)

NewGitAnalyser sets up a new pipeline for repo analysis

func (*GitRepoAnalyser) Analyze

func (g *GitRepoAnalyser) Analyze() (*GitRepoReport, error)

Analyze executes the pipeline

type GitRepoAnalyserOptions

type GitRepoAnalyserOptions struct {
	TickCount int
}

GitRepoAnalyserOptions denotes options for the analyzer

type GitRepoMeta

type GitRepoMeta struct {
	Commits  int
	First    time.Time
	Last     time.Time
	TickSize int
}

GitRepoMeta denotes the configuration used to execute the analysis

func (*GitRepoMeta) GetTickRange

func (m *GitRepoMeta) GetTickRange(t int) (time.Time, time.Time)

GetTickRange returns the beginning and end times of the given tick

type GitRepoReport

type GitRepoReport struct {
	Meta     *GitRepoMeta
	Burndown *BurndownResult
	Coupling *CouplingResult
}

GitRepoReport is a container around different analysis results

Jump to

Keyboard shortcuts

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