mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Add : mutex pprof profile (#731)
* add : mutex pprof profile * rm : remove trace from default pprof profiles
This commit is contained in:
parent
53fd1fe912
commit
87deea068a
2 changed files with 6 additions and 2 deletions
|
|
@ -129,8 +129,9 @@ func (d *DebugPprofCommand) Run(args []string) int {
|
||||||
|
|
||||||
// Only take cpu and heap profiles by default
|
// Only take cpu and heap profiles by default
|
||||||
profiles := map[string]string{
|
profiles := map[string]string{
|
||||||
"heap": "heap",
|
"heap": "heap",
|
||||||
"cpu": "cpu",
|
"cpu": "cpu",
|
||||||
|
"mutex": "mutex",
|
||||||
}
|
}
|
||||||
|
|
||||||
if !d.skiptrace {
|
if !d.skiptrace {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -96,6 +97,8 @@ func VerbosityStringToInt(loglevel string) int {
|
||||||
|
|
||||||
//nolint:gocognit
|
//nolint:gocognit
|
||||||
func NewServer(config *Config, opts ...serverOption) (*Server, error) {
|
func NewServer(config *Config, opts ...serverOption) (*Server, error) {
|
||||||
|
runtime.SetMutexProfileFraction(5)
|
||||||
|
|
||||||
srv := &Server{
|
srv := &Server{
|
||||||
config: config,
|
config: config,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue