Skip to content

rinchsan/ppprof

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ppprof

Set up pprof by ppprof

Run

go run github.com/rinchsan/ppprof/cmd/ppprof@latest -fix main.go
go run github.com/rinchsan/gosimports/cmd/gosimports@latest -w main.go

Example

package main

import (
    "log"
    "net/http"
)

func main() {
    log.Fatal(http.ListenAndServe("localhost:8080", nil))
}

package main

import (
    "log"
    "net/http"
    _ "net/http/pprof"
    "runtime"
)

func main() {
    runtime.SetBlockProfileRate(1)
    runtime.SetMutexProfileFraction(1)
    go func() {
        log.Fatal(http.ListenAndServe("localhost:6060", nil))
    }()

    log.Fatal(http.ListenAndServe("localhost:8080", nil))
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages