Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveToCache ¶
func SaveToCache(opts ChangesOptions, result ChangesResult) error
Types ¶
type AuthorCluster ¶
type AuthorLines ¶
type AuthorLines struct { AuthorName string AuthorMail string LinesTouched LinesTouched FilesTouched []FileTouched // contains filtered or unexported fields }
type AuthorLinesCluster ¶
type AuthorLinesCluster struct { Name string Value int AuthorLines []AuthorLines }
func ClusterizeAuthors ¶
func ClusterizeAuthors(changesResults []ChangesResult, numberOfClusters int) ([]AuthorLinesCluster, error)
ClusterizeAuthors processes changesResults and clusterizes authors using k-mean over the number of touched lines
type AuthorLinesDate ¶
type AuthorLinesDate struct { Since string AuthorLines AuthorLines }
type AuthorNameLinesDate ¶
type AuthorNameLinesDate struct { AuthorName string AuthorLinesDates []AuthorLinesDate }
func SortByAuthorDate ¶
func SortByAuthorDate(changesResults []ChangesResult) []AuthorNameLinesDate
type ChangesFileResult ¶
type ChangesFileResult struct { CommitId string FilePath string ChangesResult }
type ChangesOptions ¶
type ChangesResult ¶
type ChangesResult struct { /* Lines change stats */ TotalLinesTouched LinesTouched /* Total files changed in the different commits. If the same file is changed in two commits, for example, it will count as one. */ TotalFiles int /* Number of commits analysed */ TotalCommits int /* Change stats per author */ AuthorsLines []AuthorLines SinceCommit utils.CommitInfo UntilCommit utils.CommitInfo // contains filtered or unexported fields }
func AnalyseChanges ¶
func AnalyseChanges(opts ChangesOptions, progressChan chan<- utils.ProgressInfo) (ChangesResult, error)
func AnalyseTimeseriesChanges ¶
func AnalyseTimeseriesChanges(opts ChangesTimeseriesOptions, progressChan chan<- utils.ProgressInfo) ([]ChangesResult, error)
func GetFromCache ¶
func GetFromCache(opts ChangesOptions) (*ChangesResult, error)
type ChangesTimeseriesOptions ¶
type ChangesTimeseriesOptions struct { utils.BaseOptions Since string `json:"since"` Until string `json:"until"` Period string `json:"period"` }
type FileTouched ¶
type LinesTouched ¶
type LinesTouched struct { /* New lines found in commits */ New int /* Lines changed in commits. If the same line is changed in two commits, for example, it will count as two changes. This is the sum of RefactorOwn, RefactorOther, ChurnOwn and ChurnOther */ Changes int /* Lines changed after a while in which the author of the previous version was the same person */ RefactorOwn int /* Lines changed after a while in which the author of the previous version was another person */ RefactorOther int /* Lines you owned that were changed by another person after a while. When adding RefactorOther to someone, the author of the previous version of the line will have this counter incremented */ RefactorReceived int /* Lines changed in a short term in which the author of the previous version was the same person */ ChurnOwn int /* Lines changed in a short term in which the author of the previous version was another person */ ChurnOther int /* Lines you owned that were changed by another person in a short term. When adding ChurnOther to someone, the author of the previous version of the line will have this counter incremented */ ChurnReceived int /* Sum of age of lines in the moment they are changed. AgeDaysSum/Changes gives you the average survival duration of a line before it's changed by someone */ AgeDaysSum float64 }
func SumLinesTouched ¶
func SumLinesTouched(changes1 LinesTouched, changes2 LinesTouched) LinesTouched
Click to show internal directories.
Click to hide internal directories.