mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
add runtime profile rates
This commit is contained in:
parent
c7a57121b6
commit
0b81d4c9d3
1 changed files with 3 additions and 0 deletions
|
@ -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() }()
|
||||||
|
|
Loading…
Reference in a new issue