loadgen

package
v0.0.0-...-ffc47e4 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAlphaNumeric

func GenerateAlphaNumeric(promRegistry *prometheus.Registry, props *LoadGenProperties)

* GenerateAlphaNumeric generates random alphanumeric strings and writes it to a specified file at specified line rate(lps) and for specified duration.

func GenerateLoadFromInputFile

func GenerateLoadFromInputFile(promRegistry *prometheus.Registry, props *LoadGenProperties)

* GenerateLoadFromInputFile replays an input sample file from the top of the head and adheres to the specified format, line rate and duration.

func SetupLogProps

func SetupLogProps(isMetricsLogs bool, insertNewline bool, props *LoadGenProperties) *utility.LogProperties

Types

type LoadGenProperties

type LoadGenProperties struct {
	Duration                 int64           `json:"duration"`
	FileCount                int64           `json:"file-count"`
	LineLength               int64           `json:"line-length"`
	MultiLinePercent         int             `json:"multiline-percentage"`
	NumOfLinesInMultiLineLog int             `json:"line-count"`
	FilePath                 string          `json:"file-path"`
	InputSourceFile          string          `json:"input-source-file"`
	ReplayCount              int64           `json:"replay-count"`
	CustomTimestampFormat    string          `json:"custom-timestamp-format"`
	DisableTimestamp         bool            `json:"disable-timestamp"`
	Lps                      int64           `json:"lines-per-second"`
	Rotate                   bool            `json:"rotate"`
	RotateSizeMB             int64           `json:"rotation-max-file-size-megabytes"`
	EnableMetrics            bool            `json:"enable-metrics"`
	Tags                     string          `json:"tags"`
	LogFormat                *easy.Formatter `json:"-"`
	Wg                       *sync.WaitGroup `json:"-"`
	ResultLog                string          `json:"results-log"`
}

Jump to

Keyboard shortcuts

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