func (s *Server) appendStatsService(c stats.Config) { if c.Enabled { l := s.LogService.NewLogger("[stats] ", log.LstdFlags) srv := stats.NewService(c, l) srv.TaskMaster = s.TaskMaster s.Services = append(s.Services, srv) } }
func (s *Server) appendStatsService() { c := s.config.Stats if c.Enabled { l := s.LogService.NewLogger("[stats] ", log.LstdFlags) srv := stats.NewService(c, l) srv.TaskMaster = s.TaskMaster s.TaskMaster.TimingService = srv s.AppendService("stats", srv) } }