kafkaperf

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLS_MODE_NONE = "NONE"
	TLS_MODE_TLS  = "TLS"
	TLS_MODE_MTLS = "MTLS"
)
View Source
const (
	DefaultChannelBufferSize = 10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVEncodedData added in v0.2.0

type CSVEncodedData struct {
	MessageSentTime      time.Time     `csv:"MessageSentTime"`
	MessageReceivedTime  time.Time     `csv:"MessageReceivedTime"`
	Latency              time.Duration `csv:"Latency"`
	LatencyInNanoSeconds int           `csv:"LatencyInNanoSeconds"`
	Partition            int           `csv:"Partition"`
}

func NewCSVEncodedData added in v0.2.0

func NewCSVEncodedData(rawMetricsData RawMetricsData) CSVEncodedData

type Encoder

type Encoder interface {
	EncodeAsStruct(result chan<- RawMetricsData) error
	Encode(destination io.Writer) error
}

func NewEncoder

func NewEncoder(source io.Reader, encoderConfig EncoderConfig) Encoder

type EncoderConfig

type EncoderConfig struct {
	Type           string
	TimeStampField string
}

type LatencyMetrics

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

type Metrics

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

type MetricsCalculator

type MetricsCalculator interface {
	AddRawMetric(rawMetricsData RawMetricsData)
	GetMetrics() Metrics
}

func NewMetricsCalculator

func NewMetricsCalculator() MetricsCalculator

type Monitor

type Monitor interface {
	Start() error
	Stats() MonitorMetrics
}

func NewMonitor

func NewMonitor(destination io.Writer, appConfig MonitorConfig) (Monitor, error)

type MonitorConfig

type MonitorConfig struct {
	Topic            string
	BootstrapServers []string
	TlsMode          string
	CertLocation     string
	KeyLocation      string
	CACertLocation   string
}

type MonitorMetrics added in v0.2.0

type MonitorMetrics struct {
	EventsReceived  int64
	EventsRead      int64
	Lag             int64
	EventsInProcess int64
	EventsProcessed int64
}

type RawMetricsData

type RawMetricsData struct {
	MessageSentTime     time.Time
	MessageReceivedTime time.Time
	Partition           int
}

func (RawMetricsData) Latency

func (rawMetricsData RawMetricsData) Latency() time.Duration

type Reporter

type Reporter interface {
	GenerateReport(writer io.Writer) error
	Stats() ReporterStats
}

func NewReporter

func NewReporter(reportConfig ReporterConfig, encoder Encoder, metricsCalculator MetricsCalculator) Reporter

type ReporterConfig added in v0.2.1

type ReporterConfig struct {
	Type           string
	TimeStampField string
}

type ReporterStats added in v0.2.1

type ReporterStats struct {
	RecordsProcessed int64
}

Jump to

Keyboard shortcuts

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