diff --git a/cmd/zoekt-git-index/main.go b/cmd/zoekt-git-index/main.go index f41fa101e..5ba4bc38f 100644 --- a/cmd/zoekt-git-index/main.go +++ b/cmd/zoekt-git-index/main.go @@ -109,7 +109,7 @@ func run() int { opts.LanguageMap[m[0]] = ctags.StringToParser(m[1]) } - profiler.InitLightweight("zoekt-git-index") + profiler.Init("zoekt-git-index") exitStatus := 0 for dir, name := range gitRepos { opts.RepositoryDescription.Name = name diff --git a/internal/profiler/profiler.go b/internal/profiler/profiler.go index 0762e3562..84039ac92 100644 --- a/internal/profiler/profiler.go +++ b/internal/profiler/profiler.go @@ -22,17 +22,3 @@ func Init(svcName string) { } } } - -// InitLightweight starts the supported profilers IFF the environment variable is set. -// Compared to Init, it disables mutex profiling and forced GC to reduce its overhead. -func InitLightweight(svcName string) { - if os.Getenv("GOOGLE_CLOUD_PROFILER_ENABLED") != "" { - err := profiler.Start(profiler.Config{ - Service: svcName, - ServiceVersion: zoekt.Version, - }) - if err != nil { - log.Printf("could not initialize profiler: %s", err.Error()) - } - } -}