reports

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeOp     = Metric("time/op")
	Speed      = Metric("speed")
	Throughput = Metric("throughput")
	OpsPerSec  = Metric("op/s")
	MsgPerSec  = Metric("msg/s")
)

Variables

This section is empty.

Functions

func WriteReport

func WriteReport(cfg *ReportConfig, dataTable DataTable, writer io.Writer) error

Types

type DataTable

type DataTable interface {
	HasSpeed() bool
}

func CreateDataTable

func CreateDataTable(client JobRecordClient, jobIds ...string) (DataTable, error)

type JobRecordClient

type JobRecordClient interface {
	LoadJob(jobId string) (*core.JobRecord, uint64, error)
	LoadResultsArtifact(*core.JobRecord, io.Writer) error
}

type Metric

type Metric string

type ReportConfig

type ReportConfig struct {
	Title string
	// contains filtered or unexported fields
}

func (*ReportConfig) AddSections

func (r *ReportConfig) AddSections(sections ...SectionConfig) *ReportConfig

func (*ReportConfig) Log

func (r *ReportConfig) Log(format string, args ...any)

func (*ReportConfig) SetCustomLabels added in v1.2.5

func (r *ReportConfig) SetCustomLabels(customLabels []string)

func (*ReportConfig) Verbose

func (r *ReportConfig) Verbose() *ReportConfig

type ReportSectionSpec

type ReportSectionSpec struct {
	Title               string `json:"title"`
	Metric              string `json:"metric"`
	Type                string `json:"type"`
	BenchmarkFilterExpr string `json:"filter"`
}

type ReportSpec

type ReportSpec struct {
	Title    string              `json:"title"`
	Sections []ReportSectionSpec `json:"sections"`
	Labels   []string            `json:"labels"`
}

func (*ReportSpec) ConfigureReport added in v1.2.2

func (spec *ReportSpec) ConfigureReport(reportCfg *ReportConfig) error

func (*ReportSpec) Load added in v1.2.2

func (spec *ReportSpec) Load(r io.Reader) error

func (*ReportSpec) LoadFile added in v1.2.2

func (spec *ReportSpec) LoadFile(specPath string) error

type SectionConfig

type SectionConfig interface {
	// contains filtered or unexported methods
}

func HorizontalBarChart

func HorizontalBarChart(title string, metric Metric, filterExpr string) SectionConfig

func HorizontalBoxChart

func HorizontalBoxChart(title string, metric Metric, filterExpr string) SectionConfig

func HorizontalDeltaChart

func HorizontalDeltaChart(title string, metric Metric, filterExpr string) SectionConfig

func JobsTable

func JobsTable() SectionConfig

func ResultsDeltaTable

func ResultsDeltaTable(metric Metric, filterExpr string, hidden bool) SectionConfig

func ResultsTable

func ResultsTable(metric Metric, filterExpr string, hidden bool) SectionConfig

func TrendChart

func TrendChart(title string, metric Metric, filterExpr string) SectionConfig

type SectionType

type SectionType string

Jump to

Keyboard shortcuts

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