Skip to content

Commit

Permalink
Turn pprof default on with local saved files (#3894)
Browse files Browse the repository at this point in the history
* Turn pprof default on with local saved files

* [pprof] change interval from 600s to 3600s
  • Loading branch information
JackyWYX authored Apr 5, 2023
1 parent 7d5eb9c commit 78d26d7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/harmony/config_migrations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Version = "1.0.4"
Port = 9000
[Pprof]
Enabled = false
Enabled = true
ListenAddr = "127.0.0.1:6060"
[RPCOpt]
Expand Down
2 changes: 1 addition & 1 deletion cmd/harmony/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Version = "1.0.4"
Port = 9000
[Pprof]
Enabled = false
Enabled = true
ListenAddr = "127.0.0.1:6060"
[TxPool]
Expand Down
6 changes: 3 additions & 3 deletions cmd/harmony/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
10 changes: 5 additions & 5 deletions cmd/harmony/flags_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 78d26d7

Please sign in to comment.