add runtime profile rates

This commit is contained in:
Andre Medeiros 2022-11-01 19:36:40 -04:00
parent c7a57121b6
commit 0b81d4c9d3

View file

@ -35,6 +35,9 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
return fmt.Errorf("need a queue to work on") return fmt.Errorf("need a queue to work on")
} }
runtime.SetBlockProfileRate(1)
runtime.SetMutexProfileFraction(1)
svc := fmt.Sprintf("worker: %s", queueID) svc := fmt.Sprintf("worker: %s", queueID)
logger := cmdutil.NewLogger(svc) logger := cmdutil.NewLogger(svc)
defer func() { _ = logger.Sync() }() defer func() { _ = logger.Sync() }()