diff --git a/cmd/harmony/config_migrations_test.go b/cmd/harmony/config_migrations_test.go index 72db5d790..a98b31098 100644 --- a/cmd/harmony/config_migrations_test.go +++ b/cmd/harmony/config_migrations_test.go @@ -281,7 +281,7 @@ Version = "1.0.4" Port = 9000 [Pprof] - Enabled = false + Enabled = true ListenAddr = "127.0.0.1:6060" [RPCOpt] diff --git a/cmd/harmony/config_test.go b/cmd/harmony/config_test.go index 0d5879700..53b3fb030 100644 --- a/cmd/harmony/config_test.go +++ b/cmd/harmony/config_test.go @@ -79,7 +79,7 @@ Version = "1.0.4" Port = 9000 [Pprof] - Enabled = false + Enabled = true ListenAddr = "127.0.0.1:6060" [TxPool] diff --git a/cmd/harmony/default.go b/cmd/harmony/default.go index 95e05b29c..eb069efd2 100644 --- a/cmd/harmony/default.go +++ b/cmd/harmony/default.go @@ -87,11 +87,11 @@ var defaultConfig = harmonyconfig.HarmonyConfig{ }, Sync: getDefaultSyncConfig(defNetworkType), Pprof: harmonyconfig.PprofConfig{ - Enabled: false, + Enabled: true, ListenAddr: "127.0.0.1:6060", Folder: "./profiles", - ProfileNames: []string{}, - ProfileIntervals: []int{600}, + ProfileNames: []string{"cpu", "heap", "goroutine"}, + ProfileIntervals: []int{3600}, ProfileDebugValues: []int{0}, }, Log: harmonyconfig.LogConfig{ diff --git a/cmd/harmony/flags_test.go b/cmd/harmony/flags_test.go index 2015188ed..5cec657eb 100644 --- a/cmd/harmony/flags_test.go +++ b/cmd/harmony/flags_test.go @@ -122,11 +122,11 @@ func TestHarmonyFlags(t *testing.T) { LocalAccountsFile: "./.hmy/locals.txt", }, Pprof: harmonyconfig.PprofConfig{ - Enabled: false, + Enabled: true, ListenAddr: "127.0.0.1:6060", Folder: "./profiles", - ProfileNames: []string{}, - ProfileIntervals: []int{600}, + ProfileNames: []string{"cpu", "heap", "goroutine"}, + ProfileIntervals: []int{3600}, ProfileDebugValues: []int{0}, }, Log: harmonyconfig.LogConfig{ @@ -1092,9 +1092,9 @@ func TestPprofFlags(t *testing.T) { expConfig: defaultConfig.Pprof, }, { - args: []string{"--pprof"}, + args: []string{"--pprof=false"}, expConfig: harmonyconfig.PprofConfig{ - Enabled: true, + Enabled: false, ListenAddr: defaultConfig.Pprof.ListenAddr, Folder: defaultConfig.Pprof.Folder, ProfileNames: defaultConfig.Pprof.ProfileNames,