eventbenchmark

package
v0.3.94 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonFormatter

func JsonFormatter(input interface{}) ([]byte, error)

func YamlFormatter

func YamlFormatter(input interface{}) ([]byte, error)

Types

type EventDuration

type EventDuration struct {
	Received time.Time     `json:"received"`
	Duration time.Duration `json:"duration"`
	Event    string        `json:"event"`
}

type EventDurationsByJobId

type EventDurationsByJobId struct {
	JobId  string           `json:"jobId"`
	Events []*EventDuration `json:"events"`
}

type EventsBenchmark

type EventsBenchmark struct {
	Out io.Writer
	// contains filtered or unexported fields
}

func New

func New(c chan *api.EventMessage) *EventsBenchmark

func (*EventsBenchmark) NewTestCaseBenchmarkReport

func (srv *EventsBenchmark) NewTestCaseBenchmarkReport(name string) *TestCaseBenchmarkReport

func (*EventsBenchmark) Run

func (srv *EventsBenchmark) Run(ctx context.Context) error

type Formatter

type Formatter func(input interface{}) ([]byte, error)

type GlobalBenchmarkReport

type GlobalBenchmarkReport struct {
	Statistics map[string]*Statistics     `json:"statistics"`
	Subreports []*TestCaseBenchmarkReport `json:"subreports"`
}

func AggregateTestBenchmarkReports

func AggregateTestBenchmarkReports(reports []*TestCaseBenchmarkReport) *GlobalBenchmarkReport

AggregateTestBenchmarkReports aggregates all test file benchmark reports and creates a global test benchmark report.

func (*GlobalBenchmarkReport) Generate

func (r *GlobalBenchmarkReport) Generate(formatter Formatter) ([]byte, error)

type Statistics

type Statistics struct {
	Min               int64   `json:"min"`
	Max               int64   `json:"max"`
	Average           float64 `json:"average"`
	Variance          float64 `json:"variance"`
	StandardDeviation float64 `json:"standardDeviation"`
}

type TestCaseBenchmarkReport

type TestCaseBenchmarkReport struct {
	Name       string                   `json:"name"`
	Statistics map[string]*Statistics   `json:"statistics"`
	Summary    []*EventDurationsByJobId `json:"summary"`
}

func (*TestCaseBenchmarkReport) Generate

func (r *TestCaseBenchmarkReport) Generate(formatter Formatter) ([]byte, error)

func (*TestCaseBenchmarkReport) Print

func (r *TestCaseBenchmarkReport) Print(out io.Writer)

func (*TestCaseBenchmarkReport) PrintStatistics

func (r *TestCaseBenchmarkReport) PrintStatistics(out io.Writer)

func (*TestCaseBenchmarkReport) PrintSummary

func (r *TestCaseBenchmarkReport) PrintSummary(out io.Writer)

Jump to

Keyboard shortcuts

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