Documentation ¶
Index ¶
- Constants
- func FormatMemStats(memstats runtime.MemStats) string
- func MakeDefaultSmallPool(name string) *containers.VectorPool
- func MakeDefaultTransientPool(name string) *containers.VectorPool
- func MakeLockFileName(dirname string, name string) string
- func PrintMemStats()
- type Runtime
- type RuntimeOption
- func WithRuntimeObjectFS(fs *objectio.ObjectFS) RuntimeOption
- func WithRuntimeOptions(opts *options.Options) RuntimeOption
- func WithRuntimeScheduler(s tasks.TaskScheduler) RuntimeOption
- func WithRuntimeSmallPool(vp *containers.VectorPool) RuntimeOption
- func WithRuntimeThrottle(t *Throttle) RuntimeOption
- func WithRuntimeTransferTable(tt *model.HashPageTable) RuntimeOption
- func WithRuntimeTransientPool(vp *containers.VectorPool) RuntimeOption
- type Throttle
- type ThrottleOption
Constants ¶
View Source
const LockSuffix = ".lock"
View Source
const ObjectMemUnit = mpool.MB * 64
Variables ¶
This section is empty.
Functions ¶
func FormatMemStats ¶
func MakeDefaultSmallPool ¶ added in v1.0.0
func MakeDefaultSmallPool(name string) *containers.VectorPool
func MakeDefaultTransientPool ¶
func MakeDefaultTransientPool(name string) *containers.VectorPool
func MakeLockFileName ¶
func PrintMemStats ¶
func PrintMemStats()
Types ¶
type Runtime ¶
type Runtime struct { Now func() types.TS VectorPool struct { Small *containers.VectorPool Transient *containers.VectorPool } Throttle *Throttle Fs *objectio.ObjectFS TransferTable *model.HashPageTable TransferDelsMap *model.TransDelsForBlks Scheduler tasks.TaskScheduler Options *options.Options Logtail struct { CompactStats stats.Counter } }
func NewRuntime ¶
func NewRuntime(opts ...RuntimeOption) *Runtime
func (*Runtime) ExportLogtailStats ¶ added in v1.0.0
func (*Runtime) PrintVectorPoolUsage ¶
func (r *Runtime) PrintVectorPoolUsage()
type RuntimeOption ¶
type RuntimeOption func(*Runtime)
func WithRuntimeObjectFS ¶
func WithRuntimeObjectFS(fs *objectio.ObjectFS) RuntimeOption
func WithRuntimeOptions ¶
func WithRuntimeOptions(opts *options.Options) RuntimeOption
func WithRuntimeScheduler ¶
func WithRuntimeScheduler(s tasks.TaskScheduler) RuntimeOption
func WithRuntimeSmallPool ¶ added in v1.0.0
func WithRuntimeSmallPool(vp *containers.VectorPool) RuntimeOption
func WithRuntimeThrottle ¶
func WithRuntimeThrottle(t *Throttle) RuntimeOption
func WithRuntimeTransferTable ¶
func WithRuntimeTransferTable(tt *model.HashPageTable) RuntimeOption
func WithRuntimeTransientPool ¶
func WithRuntimeTransientPool(vp *containers.VectorPool) RuntimeOption
type Throttle ¶
type Throttle struct { Compaction struct { // coarse grained throttle ActiveTasks atomic.Int32 MaxActiveTasksLimit int32 MemUsed atomic.Int64 // to be used in the future MaxMemUsedLimit int64 // to be used in the future } }
func NewThrottle ¶
func NewThrottle(opts ...ThrottleOption) *Throttle
func (*Throttle) AcquireCompactionQuota ¶
func (t *Throttle) AcquireCompactionQuota()
func (*Throttle) ReleaseCompactionQuota ¶
func (t *Throttle) ReleaseCompactionQuota()
func (*Throttle) TryApplyCompactionTask ¶
only used for fine grained throttle
type ThrottleOption ¶
type ThrottleOption func(*Throttle)
func WithThrottleCompactionMaxMemUsedLimit ¶
func WithThrottleCompactionMaxMemUsedLimit(limit int64) ThrottleOption
func WithThrottleCompactionMaxTasksLimit ¶
func WithThrottleCompactionMaxTasksLimit(limit int32) ThrottleOption
Click to show internal directories.
Click to hide internal directories.