gtr: Add ID fields to Test, Benchmark and Error structs

This can optionally be used to uniquely individual tests, benchmarks or
errors.
This commit is contained in:
Joël Stemmer 2022-06-07 00:23:29 +01:00
parent c87388ae59
commit b95e18cd5c

View File

@ -82,6 +82,7 @@ func (p *Package) SetProperty(key, value string) {
// Test contains the results of a single test.
type Test struct {
ID int
Name string
Duration time.Duration
Result Result
@ -91,6 +92,7 @@ type Test struct {
// Benchmark contains the results of a single benchmark.
type Benchmark struct {
ID int
Name string
Result Result
Output []string
@ -103,6 +105,7 @@ type Benchmark struct {
// Error contains details of a build or runtime error.
type Error struct {
ID int
Name string
Duration time.Duration
Cause string