Add : mutex pprof profile (#731)

* add : mutex pprof profile

* rm : remove trace from default pprof profiles
This commit is contained in:
SHIVAM SHARMA 2023-02-14 11:06:14 +05:30 committed by GitHub
parent 53fd1fe912
commit 87deea068a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -129,8 +129,9 @@ func (d *DebugPprofCommand) Run(args []string) int {
// Only take cpu and heap profiles by default
profiles := map[string]string{
"heap": "heap",
"cpu": "cpu",
"heap": "heap",
"cpu": "cpu",
"mutex": "mutex",
}
if !d.skiptrace {

View file

@ -8,6 +8,7 @@ import (
"net"
"net/http"
"os"
"runtime"
"strings"
"time"
@ -96,6 +97,8 @@ func VerbosityStringToInt(loglevel string) int {
//nolint:gocognit
func NewServer(config *Config, opts ...serverOption) (*Server, error) {
runtime.SetMutexProfileFraction(5)
srv := &Server{
config: config,
}