From ff97b4cc6ae01af50de9c7051983901d66ce0654 Mon Sep 17 00:00:00 2001 From: Delweng Date: Wed, 2 Aug 2023 00:02:36 +0800 Subject: [PATCH] cmd/geth: disable automaxprocs log (#27814) Co-authored-by: Felix Lange --- cmd/geth/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 0dcb38358..568aec4b8 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -39,14 +39,12 @@ import ( "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/node" + "go.uber.org/automaxprocs/maxprocs" // Force-load the tracer engines to trigger registration _ "github.com/ethereum/go-ethereum/eth/tracers/js" _ "github.com/ethereum/go-ethereum/eth/tracers/native" - // Automatically set GOMAXPROCS to match Linux container CPU quota. - _ "go.uber.org/automaxprocs" - "github.com/urfave/cli/v2" ) @@ -245,6 +243,7 @@ func init() { ) app.Before = func(ctx *cli.Context) error { + maxprocs.Set() // Automatically set GOMAXPROCS to match Linux container CPU quota. flags.MigrateGlobalFlags(ctx) return debug.Setup(ctx) }