initstats

package
v1.1.0-beta.0...-b079b5f Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InitStatsPercentage atomicutil.Float64

InitStatsPercentage is the percentage of the table to load stats.

Functions

This section is empty.

Types

type RangeWorker

type RangeWorker struct {
	// contains filtered or unexported fields
}

RangeWorker is used to load stats concurrently by the range of table id.

func NewRangeWorker

func NewRangeWorker(taskName string, dealFunc func(task Task) error, maxTid, initStatsStep uint64, totalPercentageStep float64) *RangeWorker

NewRangeWorker creates a new RangeWorker.

func (*RangeWorker) LoadStats

func (ls *RangeWorker) LoadStats()

LoadStats loads stats concurrently when to init stats

func (*RangeWorker) SendTask

func (ls *RangeWorker) SendTask(task Task)

SendTask sends a task to the load stats worker.

func (*RangeWorker) Wait

func (ls *RangeWorker) Wait()

Wait closes the load stats worker.

type Task

type Task struct {
	StartTid int64
	EndTid   int64
}

Task represents the range of the table for loading stats.

Jump to

Keyboard shortcuts

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