Documentation ¶
Index ¶
- Constants
- func GetFileVersion(filePath, repo, commit string) (string, error)
- func MakeBQCSVReader() *bqCSVReader
- func MergeCSVData(c context.Context, config *Config, reader io.Reader, ...) error
- func MergeCSVWriteJSONL(config *Config, descr *coveragedb.HistoryRecord, csvReader io.Reader, ...) (int, int, error)
- type Config
- type DeletedFileLineMerger
- type FileCoverageMerger
- type FileLineCoverMerger
- type FileMergeResult
- type FileRecord
- type FileRecords
- type FileVersProvider
- type FuncProxyURI
- type LineToLineMatcher
- type MergeResult
- type RepoCommit
Constants ¶
View Source
const ( KeyKernelRepo = "kernel_repo" KeyKernelBranch = "kernel_branch" KeyKernelCommit = "kernel_commit" KeyFilePath = "file_path" KeyStartLine = "sl" KeyHitCount = "hit_count" KeyManager = "manager" )
Variables ¶
This section is empty.
Functions ¶
func GetFileVersion ¶
func MakeBQCSVReader ¶
func MakeBQCSVReader() *bqCSVReader
func MergeCSVData ¶
func MergeCSVWriteJSONL ¶
func MergeCSVWriteJSONL(config *Config, descr *coveragedb.HistoryRecord, csvReader io.Reader, w io.Writer, ) (int, int, error)
MergeCSVWriteJSONL mergers input CSV and generates JSONL records. The amount of lines generated is [count(managers)+1] * [count(kernel_files)]. Returns (totalInstrumentedLines, totalCoveredLines, error).
Types ¶
type Config ¶
type Config struct { Jobs int Workdir string Base RepoCommit FileVersProvider FileVersProvider // contains filtered or unexported fields }
type DeletedFileLineMerger ¶
type DeletedFileLineMerger struct { }
func (*DeletedFileLineMerger) Add ¶
func (a *DeletedFileLineMerger) Add(*FileRecord)
func (*DeletedFileLineMerger) Result ¶
func (a *DeletedFileLineMerger) Result() *MergeResult
type FileCoverageMerger ¶
type FileCoverageMerger interface { Add(record *FileRecord) Result() *MergeResult }
type FileLineCoverMerger ¶
type FileLineCoverMerger struct { *MergeResult // contains filtered or unexported fields }
func (*FileLineCoverMerger) Add ¶
func (a *FileLineCoverMerger) Add(record *FileRecord)
func (*FileLineCoverMerger) Result ¶
func (a *FileLineCoverMerger) Result() *MergeResult
type FileMergeResult ¶
type FileMergeResult struct { FilePath string *MergeResult }
type FileRecord ¶
type FileRecord struct { FilePath string RepoCommit StartLine int HitCount int Manager string }
type FileRecords ¶
type FileRecords struct {
// contains filtered or unexported fields
}
type FileVersProvider ¶
type FileVersProvider interface { GetFileVersions(targetFilePath string, repoCommits ...RepoCommit, ) (fileVersions, error) }
func MakeMonoRepo ¶
func MakeMonoRepo(workdir string) FileVersProvider
func MakeWebGit ¶
func MakeWebGit(funcProxy FuncProxyURI) FileVersProvider
type FuncProxyURI ¶
type LineToLineMatcher ¶
type LineToLineMatcher struct {
// contains filtered or unexported fields
}
func (*LineToLineMatcher) SameLinePos ¶
func (lm *LineToLineMatcher) SameLinePos(line int) int
type MergeResult ¶
type MergeResult struct { HitCounts map[int]int FileExists bool LineDetails map[int][]*FileRecord }
type RepoCommit ¶
Click to show internal directories.
Click to hide internal directories.