report

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(target *os.File, genGraph bool, reports ...Report) error

Compare compares the given set of reports. The first report is considered to be the base.

Types

type Config

type Config struct {
	Label        string // Label to be used when querying Prometheus.
	GraphQueries []GraphQuery
}

Config contains information needed to generate reports.

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator is used to generate load test reports.

func New

func New(label string, helper *prometheus.Helper, cfg Config) *Generator

New returns a new instance of a generator.

func (*Generator) Generate

func (g *Generator) Generate(startTime, endTime time.Time) (Report, error)

Generate returns a report from a given start time to end time.

type GraphQuery

type GraphQuery struct {
	Name  string // A friendly name for the query.
	Query string // The actual Prometheus query to be executed.
}

GraphQuery contains the query to be executed against a Prometheus instance to gather data for reports.

type Report

type Report struct {
	Label         string // A friendly name of the report.
	AvgStoreTimes map[model.LabelValue]model.SampleValue
	P99StoreTimes map[model.LabelValue]model.SampleValue
	AvgAPITimes   map[model.LabelValue]model.SampleValue
	P99APITimes   map[model.LabelValue]model.SampleValue
	Graphs        []graph
}

Report contains the entire report data comprising of several metrics that are needed to compare load test runs.

func Load

func Load(path string) (Report, error)

Load loads a report from a given file path.

Jump to

Keyboard shortcuts

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