aggregator

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

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

Aggregator collects and aggregates results from all nodes

func NewAggregator

func NewAggregator() *Aggregator

NewAggregator creates a new result aggregator

func (*Aggregator) CollectResults

func (a *Aggregator) CollectResults(ctx context.Context, clientPool *client.Pool) error

CollectResults collects results from all nodes via the client pool

func (*Aggregator) GetResultCount

func (a *Aggregator) GetResultCount() int

GetResultCount returns the number of collected results

func (*Aggregator) GetResults

func (a *Aggregator) GetResults() []*TestResult

GetResults returns all collected results

func (*Aggregator) GetSummary

func (a *Aggregator) GetSummary() *Summary

GetSummary returns aggregate statistics

type Summary

type Summary struct {
	TotalTests       int     `json:"total_tests"`
	CompletedTests   int     `json:"completed_tests"`
	FailedTests      int     `json:"failed_tests"`
	AvgThroughput    float64 `json:"avg_throughput_bps"`
	MinThroughput    float64 `json:"min_throughput_bps"`
	MaxThroughput    float64 `json:"max_throughput_bps"`
	TotalRetransmits int64   `json:"total_retransmits"`
}

Summary contains aggregate statistics

type TestResult

type TestResult struct {
	TestID        string                 `json:"test_id"`
	SourceNode    string                 `json:"source_node"`
	DestNode      string                 `json:"dest_node"`
	Status        string                 `json:"status"`
	StartTime     int64                  `json:"start_time"`
	EndTime       int64                  `json:"end_time"`
	Duration      int64                  `json:"duration"`
	ErrorMessage  string                 `json:"error_message,omitempty"`
	IperfData     map[string]interface{} `json:"iperf_data,omitempty"`
	ThroughputBps float64                `json:"throughput_bps,omitempty"`
	Retransmits   int64                  `json:"retransmits,omitempty"`
}

TestResult represents an aggregated test result

Jump to

Keyboard shortcuts

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