summary

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table struct {
	Test string      `json:"test"`
	Data [][2]string `json:"data"`
}

Table is primarily used as a source of arbitrary test output. Tests can send output to the summary table and later flush them. when flush is called so the table is serialized into a file that contains the test name on it, so you should use one table per test. the table output is typically used as a github enhanced job summary. see more: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/

func ForTest

func ForTest(tst *testing.T) *Table

ForTest returns a table ready to be written for the given test.

func (*Table) ActualQPS

func (t *Table) ActualQPS(qps float64) *Table

ActualQPS is a short for .Outputf("QPS", ".2f")

func (*Table) AddedLatency

func (t *Table) AddedLatency(latency float64) *Table

AddedLatency is a shortcut for Outputf("Added latency avg", "%2.fms")

func (*Table) BaselineLatency

func (t *Table) BaselineLatency(latency float64) *Table

BaselineLatency is a shortcut for Outputf("Baseline latency avg", "%2.fms")

func (*Table) CPU

func (t *Table) CPU(cpu int64) *Table

CPU is a shortcut for .Outputf("CPU", "%vm")

func (*Table) Client

func (t *Table) Client(clientName string) *Table

Service is a shortcut for .Output("Client")

func (*Table) DaprLatency

func (t *Table) DaprLatency(latency float64) *Table

DaprLatency is a shortcut for Outputf("Dapr latency avg", "%2.fms")

func (*Table) Flush

func (t *Table) Flush() error

Flush saves the summary into the disk using the desired format.

func (*Table) Memory

func (t *Table) Memory(cpu float64) *Table

Memory is a shortcut for .Outputf("Memory", "%vm")

func (*Table) Output

func (t *Table) Output(header, value string) *Table

Output adds a pair to the table data pairs.

func (*Table) OutputFloat64

func (t *Table) OutputFloat64(header string, value float64) *Table

OutputFloat64 same as output but converts from float64 to string.

func (*Table) OutputFortio

func (t *Table) OutputFortio(result perf.TestResult) *Table

OutputFortio summarize the fortio results.

func (*Table) OutputInt

func (t *Table) OutputInt(header string, value int) *Table

OutputInt same as output but converts from int to string.

func (*Table) OutputK6

func (t *Table) OutputK6(k6results []*loadtest.K6RunnerMetricsSummary) *Table

OutputK6 summarize the K6 results for each runner.

func (*Table) OutputK6Trend

func (t *Table) OutputK6Trend(prefix string, unit unit, trend loadtest.K6TrendMetric) *Table

OutputK6Trend outputs the given k6trend using the given prefix.

func (*Table) Outputf

func (t *Table) Outputf(header, format string, params ...any) *Table

Outputf same as output but uses a formatter.

func (*Table) P90

func (t *Table) P90(p90 float64) *Table

P90 is a short for .Outputf("P90", "%2.fms")

func (*Table) P99

func (t *Table) P99(p99 float64) *Table

P90 is a short for .Outputf("P90", "%2.fms")

func (*Table) Params

func (t *Table) Params(p perf.TestParameters) *Table

QPS is a short for .OutputInt("QPS")

func (*Table) QPS

func (t *Table) QPS(qps int) *Table

QPS is a short for .OutputInt("QPS")

func (*Table) Restarts

func (t *Table) Restarts(restarts int) *Table

Restarts is a shortcut for .OutputInt("Restarts")

func (*Table) Service

func (t *Table) Service(serviceName string) *Table

Service is a shortcut for .Output("Service")

func (*Table) SidecarCPU

func (t *Table) SidecarCPU(cpu int64) *Table

SidecarCPU is a shortcut for .Outputf("Sidecar CPU", "%vm")

func (*Table) SidecarMemory

func (t *Table) SidecarMemory(cpu float64) *Table

SidecarMemory is a shortcut for .Outputf("Sidecar Memory", "%vm")

Jump to

Keyboard shortcuts

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