covargs

package
v0.0.0-...-8023e94 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSummaries

func ComputeSummaries(files []*codecoverage.File) ([]*codecoverage.GroupCoverageSummary, []*codecoverage.Metric)

ComputeSummaries calculates aggregate summaries for all directories.

func ConvertFiles

func ConvertFiles(export *llvm.Export, base string, mapping *DiffMapping) ([]*codecoverage.File, error)

ConvertFiles converts the data in LLVM coverage JSON format into the compressed coverage format used by Chromium coverage service.

func SaveReport

func SaveReport(files []*codecoverage.File, shardSize int, dir string) (*codecoverage.CoverageReport, error)

SaveReport saves compresses coverage data to disk, optionally sharding the data into multiple files each of the same size.

Types

type DiffMapping

type DiffMapping map[string]LineMapping

DiffMapping represents a source transformation done by a diff (i.e. patch), where for each file it has a mapping from the old line number to the new one.

type LineMapping

type LineMapping map[int]int

LineMapping maps the old line number to the new one within a single file.

type ProfileEntry

type ProfileEntry struct {
	Profile string   `json:"profile"`
	Modules []string `json:"modules"`
}

func MergeEntries

func MergeEntries(ctx context.Context, dumps map[string]symbolize.DumpEntry, summary runtests.DataSinkMap) ([]ProfileEntry, error)

MergeEntries combines data from runtests and symbolizer, returning a sequence of entries, where each entry contains a raw profile and all modules (specified by build ID) present in that profile.

Directories

Path Synopsis
api
llvm
Package llvm defines data structures that can be used to read code coverage information exported from the llvm-cov tool.
Package llvm defines data structures that can be used to read code coverage information exported from the llvm-cov tool.

Jump to

Keyboard shortcuts

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