perfgate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ResultVersion = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerURL         string
	Duration          time.Duration
	ReportsPerSecond  int
	Workers           int
	RequestTimeout    time.Duration
	APISamples        int
	IngestP95Limit    time.Duration
	IngestP99Limit    time.Duration
	TopologyP95Limit  time.Duration
	HistoryP95Limit   time.Duration
	SchedulerLagLimit time.Duration
}

func DefaultConfig

func DefaultConfig() Config

type LatencySummary

type LatencySummary struct {
	Samples int     `json:"samples"`
	P50MS   float64 `json:"p50Ms"`
	P95MS   float64 `json:"p95Ms"`
	P99MS   float64 `json:"p99Ms"`
	MaxMS   float64 `json:"maxMs"`
}

func Summarize

func Summarize(values []time.Duration) LatencySummary

type Result

type Result struct {
	Version              int            `json:"version"`
	StartedAt            time.Time      `json:"startedAt"`
	FinishedAt           time.Time      `json:"finishedAt"`
	TargetDurationMS     int64          `json:"targetDurationMs"`
	TargetReportsPerSec  int            `json:"targetReportsPerSecond"`
	WarmupHellos         int            `json:"warmupHellos"`
	ScheduledReports     int            `json:"scheduledReports"`
	AcceptedReports      int            `json:"acceptedReports"`
	RejectedReceipts     int            `json:"rejectedReceipts"`
	HTTPFailures         int            `json:"httpFailures"`
	HTTP500s             int            `json:"http500s"`
	RequestErrors        int            `json:"requestErrors"`
	SchedulerMaxLagMS    float64        `json:"schedulerMaxLagMs"`
	CompletionDurationMS int64          `json:"completionDurationMs"`
	CompletionRPS        float64        `json:"completionReportsPerSecond"`
	Ingest               LatencySummary `json:"ingest"`
	Topology             LatencySummary `json:"topology"`
	HistoryList          LatencySummary `json:"historyList"`
	HistoryDetail        LatencySummary `json:"historyDetail"`
	TopologyNodes        int            `json:"topologyNodes"`
	TopologyEdges        int            `json:"topologyEdges"`
	Passed               bool           `json:"passed"`
	Failures             []string       `json:"failures,omitempty"`
}

func Run

func Run(ctx context.Context, config Config) (Result, error)

Jump to

Keyboard shortcuts

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