Add pprof
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
04edeccbf4
commit
710286d6e7
@ -7,6 +7,8 @@ import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
@ -249,6 +251,10 @@ var importAnalyzeCmd = &cli.Command{
|
||||
return nil
|
||||
}
|
||||
|
||||
go func() {
|
||||
http.ListenAndServe("localhost:6060", nil)
|
||||
}()
|
||||
|
||||
fi, err := os.Open(cctx.Args().First())
|
||||
if err != nil {
|
||||
return err
|
||||
@ -282,6 +288,7 @@ var importAnalyzeCmd = &cli.Command{
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
totalTime += tse.Duration
|
||||
for _, inv := range tse.Trace {
|
||||
if inv.Duration > leastExpensiveInvoc {
|
||||
|
Loading…
Reference in New Issue
Block a user