gc_scan

package
v0.0.0-...-c2c101f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_CONST float64 = 10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GcScan

type GcScan struct {
	Unit   string
	Period int
	Store  *storage.YigFsStorage
	// contains filtered or unexported fields
}

func NewGcScan

func NewGcScan(ctx context.Context, store *storage.YigFsStorage, gcCfg helper.GcConfig, msgBus helper.MsgBusConfig, leadeMgr *tools.LeaderMgr, wg *sync.WaitGroup, gcExecuting, gcCompleted int) (gcScan *GcScan, err error)

func (*GcScan) Run

func (gs *GcScan) Run()

func (*GcScan) Stop

func (gs *GcScan) Stop()

type GcSegment

type GcSegment struct {
}

func (*GcSegment) GetCost

func (g *GcSegment) GetCost(ctx context.Context, seg *types.GcSegmentInfo) (cost float64)

func (*GcSegment) GetMaxAndMinAge

func (g *GcSegment) GetMaxAndMinAge(segs []int64)

type Heap

type Heap struct {
	Size  int
	Elems []*types.GcSegmentInfo
}

func NewHeap

func NewHeap(maxSize int) *Heap

func (*Heap) GetTopHeapValue

func (h *Heap) GetTopHeapValue() float64

func (*Heap) Pop

func (h *Heap) Pop() (seg *types.GcSegmentInfo)

func (*Heap) Push

func (h *Heap) Push(seg *types.GcSegmentInfo)

Jump to

Keyboard shortcuts

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