Documentation ¶
Overview ¶
Package stressors implements resource stressors for CPU, Memory, I/O and network
Index ¶
Constants ¶
View Source
const DefaultSlice = 100 * time.Millisecond
DefaultSlice default CPU stress slice
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CPUDisruption ¶
CPUDisruption defines a disruption that stress the CPU
type CPUStressor ¶
CPUStressor defines a stressor for CPU
type ResourceDisruption ¶
type ResourceDisruption struct {
CPUDisruption
}
ResourceDisruption defines a disruption that stress the CPU and Memory of a target
type ResourceStressOptions ¶
type ResourceStressOptions struct { // Slice defines the interval of CPU stress. Default 100ms // Each slice is divided between busy and idle times to achieve a target load // Smaller slices should have smoother cpu consumption Slice time.Duration }
ResourceStressOptions defines options that control the resource stressing
type ResourceStressor ¶
type ResourceStressor struct { Options ResourceStressOptions Disruption ResourceDisruption }
ResourceStressor defines a resource stressor
func NewResourceStressor ¶
func NewResourceStressor(disruption ResourceDisruption, options ResourceStressOptions) (*ResourceStressor, error)
NewResourceStressor creates a new ResourceStressor using the given options
Click to show internal directories.
Click to hide internal directories.