Closed dumbFeng closed 2 years ago
In (*Holmes).EnableDump, the current cpu percent shouldn't be assigned with cpu but curCPU. Like the following code:
cpu
curCPU
func (h *Holmes) EnableDump(curCPU int) (err error) { if h.opts.CPUMaxPercent != 0 && curCPU >= h.opts.CPUMaxPercent { return fmt.Errorf("current cpu percent [%v] is greater than the CPUMaxPercent [%v]", curCPU, h.opts.CPUMaxPercent) } return nil }
Thanks!
In (*Holmes).EnableDump, the current cpu percent shouldn't be assigned with
cpu
butcurCPU
. Like the following code: