Skip to content

Commit

Permalink
statistics: print the process of init stats
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <[email protected]>
  • Loading branch information
hawkingrei committed May 27, 2024
1 parent 3a61aa2 commit 96b7c43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/statistics/handle/initstats/load_stats_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (
// NOTE: Do not create a new logger for each log, it will cause the sampler not work.
// Because we need to record the log count with the same level and message in this specific logger.
// Do not use it to log the message that is not related to statistics.
func SingletonStatsSamplerLogger() *zap.Logger {
func singletonStatsSamplerLogger() *zap.Logger {
init := func() {
if samplerLogger == nil {
// Create a new zapcore sampler with options
Expand Down Expand Up @@ -82,7 +82,7 @@ func NewRangeWorker(taskName string, dealFunc func(task Task) error, maxTid, ini
taskChan: make(chan Task, 1),
taskCnt: taskCnt,
}
worker.logger = SingletonStatsSamplerLogger()
worker.logger = singletonStatsSamplerLogger()
return worker
}

Expand Down

0 comments on commit 96b7c43

Please sign in to comment.