Documentation
¶
Index ¶
- Variables
- func Report(profiles []*Profile, out io.Writer) (coverage float64, err error)
- func Version() string
- func Write(out io.Writer, profile *Profile, f *FuncExtent) error
- func WriteOutput(profiles []*Profile, out io.Writer) (coverage float64, err error)
- type Boundary
- type FuncExtent
- type FuncVisitor
- type Profile
- type ProfileBlock
Constants ¶
This section is empty.
Variables ¶
var OnlyShow string
Functions ¶
Types ¶
type Boundary ¶
type Boundary struct { Offset int // Location as a byte offset in the source file. Start bool // Is this the start of a block? Count int // Event count from the cover profile. }
Boundary represents the position in a source file of the beginning or end of a block as reported by the coverage profile. In HTML mode, it will correspond to the opening or closing of a <span> tag and will be used to colorize the source
type FuncExtent ¶
type FuncExtent struct { Name string Decl *ast.FuncDecl Offset int End int // contains filtered or unexported fields }
FuncExtent describes a function's extent in the source by file and position.
type FuncVisitor ¶
type FuncVisitor struct {
// contains filtered or unexported fields
}
FuncVisitor implements the visitor that builds the function position list for a file.
type Profile ¶
type Profile struct { Filename string Mode string Blocks []ProfileBlock }
Profile represents the profiling data for a specific file.
func ParseProfiles ¶
ParseProfiles parses profile data in the specified file and returns a Profile for each source file described therein.
func (*Profile) Boundaries ¶
Boundaries returns a Profile as a set of Boundary objects within the provided src.
type ProfileBlock ¶
ProfileBlock represents a single block of profiling data.