analytics

package
v0.0.0-...-8f5306e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	APIToken string
	Endpoint string
	RunEnv   map[string]string
	Client   *http.Client
	Debug    bool
}

func (*Client) UploadTestResults

func (c *Client) UploadTestResults(r []Result) (Response, error)

UploadTestResults uploads results to the Buildkite Analytics API

type History

type History struct {
	StartAt  float64 `json:"start_at,omitempty"`
	EndAt    float64 `json:"end_at,omitempty"`
	Duration float64 `json:"duration"`
	Children []Span  `json:"children,omitempty"`
}

History represents the overall duration of the test run and contains detailed span data, more finely recording the test run.

type Response

type Response struct {
	ID      string   `json:"id"`
	RunID   string   `json:"run_id"`
	Queued  int      `json:"queued"`
	Skipped int      `json:"skipped"`
	Errors  []string `json:"errors"`
	RunURL  string   `json:"run_url"`
}

type Result

type Result struct {
	ID            string  `json:"id"`
	Scope         string  `json:"scope"`
	Name          string  `json:"name"`
	Identifier    string  `json:"identifier,omitempty"`
	Location      string  `json:"location,omitempty"`
	FileName      string  `json:"file_name,omitempty"`
	Result        string  `json:"result"`
	FailureReason string  `json:"failure_reason,omitempty"`
	History       History `json:"history"`
}

Result represents a single test run.

type Span

type Span struct {
	Section  string  `json:"section"`
	StartAt  float64 `json:"start_at"`
	EndAt    float64 `json:"end_at"`
	Duration float64 `json:"duration"`
}

Span represent the finest duration resolution of a test run.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL