mirror of
https://github.com/jstemmer/go-junit-report.git
synced 2025-07-08 06:45:12 -05:00
gtr,parser/gotest: move Event and building a report to parser/gotest
The Parse method now directly returns a report, rather than a list of events that then need to be converted into a report. As part of this change, the Event struct has also been moved to the gotest package. It's now the responsibility of the parser to construct a gtr.Report.
This commit is contained in:
25
pkg/parser/gotest/event.go
Normal file
25
pkg/parser/gotest/event.go
Normal file
@ -0,0 +1,25 @@
|
||||
package gotest
|
||||
|
||||
import "time"
|
||||
|
||||
// Event is a single event in a test or benchmark.
|
||||
type Event struct {
|
||||
Type string
|
||||
|
||||
Name string
|
||||
Result string
|
||||
Duration time.Duration
|
||||
Data string
|
||||
Indent int
|
||||
|
||||
// Code coverage
|
||||
CovPct float64
|
||||
CovPackages []string
|
||||
|
||||
// Benchmarks
|
||||
Iterations int64
|
||||
NsPerOp float64
|
||||
MBPerSec float64
|
||||
BytesPerOp int64
|
||||
AllocsPerOp int64
|
||||
}
|
Reference in New Issue
Block a user