Documentation ¶
Index ¶
- func AggregateProfiles(profiles [][]*cover.Profile) ([]*cover.Profile, error)
- func DiffProfiles(before []*cover.Profile, after []*cover.Profile) ([]*cover.Profile, error)
- func DumpProfile(profiles []*cover.Profile, writer io.Writer) error
- func FilterProfilePaths(profile []*cover.Profile, paths []string, include bool) ([]*cover.Profile, error)
- func MergeMultipleProfiles(profiles [][]*cover.Profile) ([]*cover.Profile, error)
- func MergeProfiles(a []*cover.Profile, b []*cover.Profile) ([]*cover.Profile, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AggregateProfiles ¶
AggregateProfiles takes multiple coverage profiles and produces a new coverage profile that counts the number of profiles that hit a block at least once.
func DiffProfiles ¶
DiffProfiles returns the difference between two sets of coverage profiles. The profiles are expected to be from a single execution of the same binary (or multiple binaries, if using a merged coverage profile)
func DumpProfile ¶
DumpProfile dumps the profiles given to writer in go coverage format.
func FilterProfilePaths ¶
func FilterProfilePaths(profile []*cover.Profile, paths []string, include bool) ([]*cover.Profile, error)
FilterProfilePaths produces a new profile that removes either everything matching or everything not matching the provided paths, depending on the value of include. Paths are interpreted as regular expressions. If include is true, paths is treated as a whitelist; otherwise it is treated as a blacklist.
func MergeMultipleProfiles ¶
MergeMultipleProfiles merges more than two profiles together. MergeMultipleProfiles is equivalent to calling MergeProfiles on pairs of profiles until only one profile remains.
func MergeProfiles ¶
MergeProfiles merges two coverage profiles. The profiles are expected to be similar - that is, from multiple invocations of a single binary, or multiple binaries using the same codebase. In particular, any source files with the same path must have had identical content when building the binaries. MergeProfiles expects its arguments to be sorted: Profiles in alphabetical order, and lines in files in the order those lines appear. These are standard constraints for Go coverage profiles. The resulting profile will also obey these constraints.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
calculation
Package calculation calculates coverage through summarizing and filtering.
|
Package calculation calculates coverage through summarizing and filtering. |