good morning!!!!

Skip to content
Snippets Groups Projects
Commit 48705f8a authored by Felix Lange's avatar Felix Lange
Browse files

internal/debug: add debug_setGCPercent

parent 10b3f97c
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,12 @@ func (*HandlerT) FreeOSMemory() {
debug.FreeOSMemory()
}
// SetGCPercent sets the garbage collection target percentage. It returns the previous
// setting. A negative value disables GC.
func (*HandlerT) SetGCPercent(v int) int {
return debug.SetGCPercent(v)
}
func writeProfile(name, file string) error {
p := pprof.Lookup(name)
log.Info("Writing profile records", "count", p.Count(), "type", name, "dump", file)
......
......@@ -267,6 +267,11 @@ web3._extend({
call: 'debug_freeOSMemory',
params: 0,
}),
new web3._extend.Method({
name: 'setGCPercent',
call: 'debug_setGCPercent',
params: 1,
}),
new web3._extend.Method({
name: 'memStats',
call: 'debug_memStats',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment