broker

package
v0.0.0-...-3705e9c Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Benchmark

type Benchmark struct {
	BrokerdHost   string
	BrokerName    string
	BrokerHost    string
	BrokerPort    string
	PeerHosts     []string
	NumMessages   uint
	MessageSize   uint64
	Publishers    uint
	Subscribers   uint
	StartupSleep  uint
	DaemonTimeout uint
}

Benchmark contains configuration settings for broker tests.

type Client

type Client struct {
	Benchmark *Benchmark
	// contains filtered or unexported fields
}

Client provides an API for interacting with Flotilla.

func NewClient

func NewClient(b *Benchmark) (*Client, error)

NewClient creates and returns a new Client from the provided Benchmark configuration. It returns an error if the Benchmark is not valid or it can't communicate with any of the specified peers.

func (*Client) Start

func (c *Client) Start() ([]*ResultContainer, error)

Start begins the broker test.

func (*Client) Teardown

func (c *Client) Teardown()

Teardown performs any necessary cleanup logic, including stopping the broker and tearing down peers.

type LatencyResults

type LatencyResults struct {
	Min    int64   `json:"min"`
	Q1     int64   `json:"q1"`
	Q2     int64   `json:"q2"`
	Q3     int64   `json:"q3"`
	Max    int64   `json:"max"`
	Mean   float64 `json:"mean"`
	StdDev float64 `json:"std_dev"`
}

LatencyResults contains the latency result data for a single peer.

type Result

type Result struct {
	Duration   float32        `json:"duration,omitempty"`
	Throughput float32        `json:"throughput,omitempty"`
	Latency    LatencyResults `json:"latency,omitempty"`
	Err        string         `json:"error"`
}

Result contains test result data for a single peer.

type ResultContainer

type ResultContainer struct {
	Peer              string
	PublisherResults  []*Result
	SubscriberResults []*Result
}

ResultContainer contains the Results for a single node.

Jump to

Keyboard shortcuts

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