| Index: logdog/client/cmd/logdog_annotee/main.go
|
| diff --git a/logdog/client/cmd/logdog_annotee/main.go b/logdog/client/cmd/logdog_annotee/main.go
|
| index ff148916923dbac90d2aaf801192452eaadfbe97..3c08996bbeaca5c3457b8836683730c58fc36fb2 100644
|
| --- a/logdog/client/cmd/logdog_annotee/main.go
|
| +++ b/logdog/client/cmd/logdog_annotee/main.go
|
| @@ -18,6 +18,7 @@ import (
|
| log "github.com/luci/luci-go/common/logging"
|
| "github.com/luci/luci-go/common/logging/gologger"
|
| "github.com/luci/luci-go/common/proto/milo"
|
| + "github.com/luci/luci-go/common/runtime/profiling"
|
| "github.com/luci/luci-go/logdog/client/annotee"
|
| "github.com/luci/luci-go/logdog/client/annotee/executor"
|
| "github.com/luci/luci-go/logdog/client/bootstrapResult"
|
| @@ -66,6 +67,8 @@ type application struct {
|
| prefix streamproto.StreamNameFlag
|
| logdogHost string
|
|
|
| + prof profiling.Profiler
|
| +
|
| bootstrap *bootstrap.Bootstrap
|
| }
|
|
|
| @@ -160,6 +163,7 @@ func mainImpl(args []string) int {
|
|
|
| fs := &flag.FlagSet{}
|
| logFlags.AddFlags(fs)
|
| + a.prof.AddFlags(fs)
|
| a.addToFlagSet(fs)
|
| if err := fs.Parse(args); err != nil {
|
| log.WithError(err).Errorf(a, "Failed to parse flags.")
|
| @@ -217,6 +221,14 @@ func mainImpl(args []string) int {
|
| a.annotationInterval = 0
|
| }
|
|
|
| + // Start our profiling service. This will be a no-op if the profiler is not
|
| + // configured.
|
| + a.prof.Logger = log.Get(a)
|
| + if err := a.prof.Start(); err != nil {
|
| + log.WithError(err).Errorf(a, "Failed to start profiler.")
|
| + return runtimeErrorReturnCode
|
| + }
|
| +
|
| // Initialize our link generator, if we can.
|
| e := executor.Executor{
|
| Options: annotee.Options{
|
|
|