Documentation ¶
Index ¶
- func SaveToCache(opts OwnershipOptions, result OwnershipResult) error
- type AuthorCluster
- type AuthorLines
- type AuthorLinesCluster
- type AuthorLinesDate
- type AuthorNameLinesDate
- type OwnershipOptions
- type OwnershipResult
- func AnalyseOwnership(opts OwnershipOptions, progressChan chan<- utils.ProgressInfo) (OwnershipResult, error)
- func AnalyseTimeseriesOwnership(opts OwnershipTimeseriesOptions, progressChan chan<- utils.ProgressInfo) ([]OwnershipResult, error)
- func GetFromCache(opts OwnershipOptions) (*OwnershipResult, error)
- type OwnershipTimeseriesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveToCache ¶
func SaveToCache(opts OwnershipOptions, result OwnershipResult) error
Types ¶
type AuthorCluster ¶
type AuthorLines ¶
type AuthorLines struct { AuthorName string `json:"author_name"` AuthorMail string `json:"author_mail"` OwnedLinesTotal int `json:"owned_lines_total"` OwnedLinesAgeDaysSum float64 `json:"owned_lines_age_days_sum"` // OwnedLinesDuplicate total lines owned that were found duplicated in repo OwnedLinesDuplicate int `json:"owned_lines_duplicate"` // OwnedLinesDuplicateOriginal total lines owned that were found duplicated in repo but were originally created by the author OwnedLinesDuplicateOriginal int `json:"owned_lines_duplicate_original"` // OwnedLinesDuplicateOriginalOthers total lines owned that were found duplicated by someone else (your code was duplicated by others) OwnedLinesDuplicateOriginalOthers int `json:"owned_lines_duplicate_original_others"` }
type AuthorLinesCluster ¶
type AuthorLinesCluster struct { Name string Value int AuthorLines []AuthorLines }
func ClusterizeAuthors ¶
func ClusterizeAuthors(changesResults []OwnershipResult, numberOfClusters int) ([]AuthorLinesCluster, error)
ClusterizeAuthors processes ownershipResults and clusterizes authors using k-mean over the number of owned lines
type AuthorLinesDate ¶
type AuthorLinesDate struct { Date string AuthorLines AuthorLines }
type AuthorNameLinesDate ¶
type AuthorNameLinesDate struct { AuthorName string AuthorLinesDate []AuthorLinesDate }
func SortByAuthorDate ¶
func SortByAuthorDate(ownershipResults []OwnershipResult) []AuthorNameLinesDate
type OwnershipOptions ¶
type OwnershipOptions struct { utils.BaseOptions MinDuplicateLines int `json:"min_duplicate_lines"` CommitId string `json:"commit_id"` }
type OwnershipResult ¶
type OwnershipResult struct { Commit utils.CommitInfo `json:"commit"` TotalFiles int `json:"total_files"` TotalLines int `json:"total_lines"` TotalLinesDuplicated int `json:"total_files_duplicated"` LinesAgeDaysSum float64 `json:"lines_age_days_sum"` AuthorsLines []AuthorLines `json:"authors_lines"` FilePath string `json:"file_path"` DuplicateLineGroups []utils.LineGroup `json:"duplicate_line_groups"` // contains filtered or unexported fields }
func AnalyseOwnership ¶
func AnalyseOwnership(opts OwnershipOptions, progressChan chan<- utils.ProgressInfo) (OwnershipResult, error)
func AnalyseTimeseriesOwnership ¶
func AnalyseTimeseriesOwnership(opts OwnershipTimeseriesOptions, progressChan chan<- utils.ProgressInfo) ([]OwnershipResult, error)
func GetFromCache ¶
func GetFromCache(opts OwnershipOptions) (*OwnershipResult, error)
Click to show internal directories.
Click to hide internal directories.