Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Class ¶
type Class struct { Name string `xml:"name,attr"` Filename string `xml:"filename,attr"` LineRate float32 `xml:"line-rate,attr"` BranchRate float32 `xml:"branch-rate,attr"` Complexity float32 `xml:"complexity,attr"` Methods []*Method `xml:"methods>method"` Lines Lines `xml:"lines>line"` }
func (Class) HitRate ¶
HitRate returns a float32 from 0.0 to 1.0 representing what fraction of lines have hits
func (Class) NumLinesWithHits ¶
NumLinesWithHits returns the number of lines with a hit count > 0
type Coverage ¶
type Coverage struct { XMLName xml.Name `xml:"coverage"` LineRate float32 `xml:"line-rate,attr"` BranchRate float32 `xml:"branch-rate,attr"` Version string `xml:"version,attr"` Timestamp int64 `xml:"timestamp,attr"` LinesCovered int64 `xml:"lines-covered,attr"` LinesValid int64 `xml:"lines-valid,attr"` BranchesCovered int64 `xml:"branches-covered,attr"` BranchesValid int64 `xml:"branches-valid,attr"` Complexity float32 `xml:"complexity,attr"` Sources []*Source `xml:"sources>source"` Packages []*Package `xml:"packages>package"` }
func (*Coverage) FromProfiles ¶
func (Coverage) HitRate ¶
HitRate returns a float32 from 0.0 to 1.0 representing what fraction of lines have hits
func (Coverage) NumLinesWithHits ¶
NumLinesWithHits returns the number of lines with a hit count > 0
type Lines ¶
type Lines []*Line
Lines is a slice of Line pointers, with some convenience methods
func (*Lines) AddOrUpdateLine ¶
AddOrUpdateLine adds a line if it is a different line than the last line recorded. If it's the same line as the last line recorded then we update the hits down if the new hits is less; otherwise just leave it as-is
func (Lines) HitRate ¶
HitRate returns a float32 from 0.0 to 1.0 representing what fraction of lines have hits
func (Lines) NumLinesWithHits ¶
NumLinesWithHits returns the number of lines with a hit count > 0
type Method ¶
type Method struct { Name string `xml:"name,attr"` Signature string `xml:"signature,attr"` LineRate float32 `xml:"line-rate,attr"` BranchRate float32 `xml:"branch-rate,attr"` Complexity float32 `xml:"complexity,attr"` Lines Lines `xml:"lines>line"` }
func (Method) HitRate ¶
HitRate returns a float32 from 0.0 to 1.0 representing what fraction of lines have hits
func (Method) NumLinesWithHits ¶
NumLinesWithHits returns the number of lines with a hit count > 0
type Package ¶
type Package struct { Name string `xml:"name,attr"` LineRate float32 `xml:"line-rate,attr"` BranchRate float32 `xml:"branch-rate,attr"` Complexity float32 `xml:"complexity,attr"` Classes []*Class `xml:"classes>class"` }
func (Package) HitRate ¶
HitRate returns a float32 from 0.0 to 1.0 representing what fraction of lines have hits
func (Package) NumLinesWithHits ¶
NumLinesWithHits returns the number of lines with a hit count > 0