Documentation
¶
Index ¶
- type BinaryProfile
- func (c BinaryProfile) Checksum() string
- func (c BinaryProfile) Clone() BinaryProfile
- func (c BinaryProfile) ForeachBlock(fn func(pkgFile string, data *BlockStats) bool)
- func (c BinaryProfile) Labels() []string
- func (c BinaryProfile) MergeSameLoad(b BinaryProfile) error
- func (c BinaryProfile) SortAll()
- func (c BinaryProfile) StaticChecksum() string
- func (c BinaryProfile) StaticChecksum_Col8bits() string
- func (c BinaryProfile) StaticFileChecksum() map[string]string
- func (c BinaryProfile) ToBlockProfile() BlockProfile
- type BlockData
- type BlockProfile
- func (c BlockProfile) Append(pkgFile string, data *BlockData)
- func (c BlockProfile) ForeachBlock(fn func(pkgFile string, data *BlockData) bool)
- func (c BlockProfile) LeftJoin(b BlockProfile, ...) BlockProfile
- func (c BlockProfile) MakeBlockMapping() map[PkgFile]map[model.Block]*BlockData
- func (c BlockProfile) SortAll()
- type BlockStats
- type BlockStatsSlice
- type Detail
- type Item
- type Mode
- type PkgFile
- type PkgPath
- type ShortFilename
- type Summary
- type UncoveredItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryProfile ¶
type BinaryProfile map[PkgFile][]*BlockStats
BinaryProfile represents results generated dynamically it is named binary to distinguish with the original string-formatted profile.
func (BinaryProfile) Checksum ¶
func (c BinaryProfile) Checksum() string
func (BinaryProfile) Clone ¶
func (c BinaryProfile) Clone() BinaryProfile
func (BinaryProfile) ForeachBlock ¶
func (c BinaryProfile) ForeachBlock(fn func(pkgFile string, data *BlockStats) bool)
func (BinaryProfile) Labels ¶
func (c BinaryProfile) Labels() []string
func (BinaryProfile) MergeSameLoad ¶
func (c BinaryProfile) MergeSameLoad(b BinaryProfile) error
before calling MergeSameLoad, you should call StaticChecksum to compare if two profiles have have the same static structure.
func (BinaryProfile) SortAll ¶
func (c BinaryProfile) SortAll()
func (BinaryProfile) StaticChecksum ¶
func (c BinaryProfile) StaticChecksum() string
StaticChecksum return's the profile's block info checksum, discarding dynamic counters. It can be used to check if two profile have the same static checksum to safely perform merge operation.
func (BinaryProfile) StaticChecksum_Col8bits ¶
func (c BinaryProfile) StaticChecksum_Col8bits() string
StaticChecksum_Col8bits this is a temporary util method, for bugfix.
func (BinaryProfile) StaticFileChecksum ¶
func (c BinaryProfile) StaticFileChecksum() map[string]string
StaticFileChecksum return's the profile's block info checksum, grouping by file
func (BinaryProfile) ToBlockProfile ¶
func (c BinaryProfile) ToBlockProfile() BlockProfile
type BlockProfile ¶
BlockProfile a general way to organize block
func (BlockProfile) Append ¶
func (c BlockProfile) Append(pkgFile string, data *BlockData)
func (BlockProfile) ForeachBlock ¶
func (c BlockProfile) ForeachBlock(fn func(pkgFile string, data *BlockData) bool)
func (BlockProfile) LeftJoin ¶
func (c BlockProfile) LeftJoin(b BlockProfile, joint func(a interface{}, b interface{}) (r interface{}, ok bool)) BlockProfile
LeftJoin perform join operation on two profiles, identifying blocks are based on a. joint: if a,b not nil, they are joined together.
func (BlockProfile) MakeBlockMapping ¶
func (c BlockProfile) MakeBlockMapping() map[PkgFile]map[model.Block]*BlockData
func (BlockProfile) SortAll ¶
func (c BlockProfile) SortAll()
type BlockStats ¶
type BlockStats struct {
*model.Block
// Count times execution reached
Count map[string]int64 `json:"count"` // including empty label
}
func (*BlockStats) Add ¶
func (c *BlockStats) Add(b merge.Counter) merge.Counter
Add implements merge.Counter
func (*BlockStats) Clone ¶
func (c *BlockStats) Clone() *BlockStats
func (*BlockStats) GetBlock ¶
func (c *BlockStats) GetBlock() *model.Block
func (*BlockStats) MergeBlockStats ¶
func (c *BlockStats) MergeBlockStats(b *BlockStats) *BlockStats
MergeBlockStats add labels
type BlockStatsSlice ¶
type BlockStatsSlice []*BlockStats
func (BlockStatsSlice) SortCopy ¶
func (c BlockStatsSlice) SortCopy() BlockStatsSlice
type ShortFilename ¶
type ShortFilename = string // xxx.go