Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorker ¶
func NewWorker(statsHandle statstypes.StatsHandle, sysProcTracker sysproctrack.Tracker, maxConcurrency int) *worker
NewWorker creates a new worker.
Types ¶
type Refresher ¶
type Refresher struct { // Jobs is the priority queue of analysis jobs. // Exported for testing purposes. Jobs *priorityqueue.AnalysisPriorityQueue // contains filtered or unexported fields }
Refresher provides methods to refresh stats info. NOTE: Refresher is not thread-safe.
func NewRefresher ¶
func NewRefresher( statsHandle statstypes.StatsHandle, sysProcTracker sysproctrack.Tracker, ) *Refresher
NewRefresher creates a new Refresher and starts the goroutine.
func (*Refresher) AnalyzeHighestPriorityTables ¶
AnalyzeHighestPriorityTables picks tables with the highest priority and analyzes them.
func (*Refresher) Close ¶
func (r *Refresher) Close()
Close stops all running jobs and releases resources.
func (*Refresher) GetRunningJobs ¶
GetRunningJobs returns the currently running jobs. Only used in the test.
func (*Refresher) RebuildTableAnalysisJobQueue ¶
RebuildTableAnalysisJobQueue rebuilds the priority queue of analysis jobs.
func (*Refresher) UpdateConcurrency ¶
func (r *Refresher) UpdateConcurrency()
UpdateConcurrency updates the maximum concurrency for auto-analyze jobs
func (*Refresher) WaitAutoAnalyzeFinishedForTest ¶
func (r *Refresher) WaitAutoAnalyzeFinishedForTest()
WaitAutoAnalyzeFinishedForTest waits for the auto analyze job to be finished. Only used in the test.
Click to show internal directories.
Click to hide internal directories.