Documentation ¶
Index ¶
- type BaseHandler
- type BucketLeakingLimiter
- type BulkWriteHandler
- type DropCollection
- type JobHandler
- type JobPool
- type Limiter
- type Metrics
- type MutableBucketLeakingLimiter
- type NoLimitLimiter
- type ReadHandler
- type SleepHandler
- type UpdateHandler
- type Worker
- func (w *Worker) Cancel()
- func (w *Worker) Close()
- func (w *Worker) ExtendCopySavedFieldsToDataPool()
- func (w *Worker) InitMetrics()
- func (w *Worker) IsDone() bool
- func (w *Worker) JobName() string
- func (w *Worker) RequestedDurationSeconds() uint64
- func (w *Worker) RequestedOperations() uint64
- func (w *Worker) Summary()
- func (w *Worker) Work(agents chan uint64)
- type WriteHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseHandler ¶
type BaseHandler struct {
// contains filtered or unexported fields
}
type BucketLeakingLimiter ¶
type BucketLeakingLimiter struct {
// contains filtered or unexported fields
}
func NewBucketLeakingLimiter ¶
func NewBucketLeakingLimiter(rps uint64) *BucketLeakingLimiter
func (*BucketLeakingLimiter) Take ¶
func (limiter *BucketLeakingLimiter) Take()
type BulkWriteHandler ¶
type BulkWriteHandler struct {
*BaseHandler
}
func (*BulkWriteHandler) Execute ¶
func (h *BulkWriteHandler) Execute() error
type DropCollection ¶
type DropCollection struct {
*BaseHandler
}
func (*DropCollection) Execute ¶
func (h *DropCollection) Execute() error
type JobHandler ¶
type JobHandler interface {
Execute() error
}
type JobPool ¶
type JobPool interface { SpawnJob() bool MarkJobDone() Cancel() GetRequestsStarted() uint64 GetRequestsDone() uint64 }
func NewDeductionJobPool ¶
func NewJobPool ¶
func NewNoLimitTimerJobPool ¶
func NewNoLimitTimerJobPool() JobPool
func NewTimerJobPool ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) DurationSeconds ¶
type MutableBucketLeakingLimiter ¶
type MutableBucketLeakingLimiter struct {
// contains filtered or unexported fields
}
func NewMutableBucketLeakingLimiter ¶
func NewMutableBucketLeakingLimiter(rate uint64) *MutableBucketLeakingLimiter
newAtomicBased returns a new atomic based limiter.
func (*MutableBucketLeakingLimiter) SetRate ¶
func (l *MutableBucketLeakingLimiter) SetRate(rate uint64)
func (*MutableBucketLeakingLimiter) Take ¶
func (l *MutableBucketLeakingLimiter) Take()
Take blocks to ensure that the time spent between multiple Take calls is on average time.Second/rate.
type NoLimitLimiter ¶
type NoLimitLimiter struct{}
func NewNoLimitLimiter ¶
func NewNoLimitLimiter() *NoLimitLimiter
func (*NoLimitLimiter) SetRate ¶
func (*NoLimitLimiter) SetRate(uint64)
func (*NoLimitLimiter) Take ¶
func (*NoLimitLimiter) Take()
type ReadHandler ¶
type ReadHandler struct {
*BaseHandler
}
func (*ReadHandler) Execute ¶
func (h *ReadHandler) Execute() error
type SleepHandler ¶
func (*SleepHandler) Execute ¶
func (h *SleepHandler) Execute() error
type UpdateHandler ¶
type UpdateHandler struct {
*BaseHandler
}
func (*UpdateHandler) Execute ¶
func (h *UpdateHandler) Execute() error
type Worker ¶
type Worker struct { Metrics *Metrics // contains filtered or unexported fields }
todo: split this function to setup and to starting workers
func (*Worker) ExtendCopySavedFieldsToDataPool ¶
func (w *Worker) ExtendCopySavedFieldsToDataPool()
todo: fix wrong place invalid
func (*Worker) InitMetrics ¶
func (w *Worker) InitMetrics()
func (*Worker) RequestedDurationSeconds ¶
func (*Worker) RequestedOperations ¶
type WriteHandler ¶
type WriteHandler struct {
*BaseHandler
}
func (*WriteHandler) Execute ¶
func (h *WriteHandler) Execute() error
Click to show internal directories.
Click to hide internal directories.