Skip to content

Commit

Permalink
enable pprof
Browse files Browse the repository at this point in the history
Signed-off-by: Jianwei Mao <maojianwei2016@126.com>
  • Loading branch information
MaoJianwei authored Sep 12, 2024
1 parent 26958bf commit d89f540
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"os"
"runtime"
"strings"
_ "net/http/pprof"
)

const (
Expand Down Expand Up @@ -389,7 +390,10 @@ func readGeneralClientArgs(cmd *cobra.Command) error {


func main() {

go func() {
log.Print(http.ListenAndServe("0.0.0.0:39999", nil))

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-20.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / publish-npm

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.18)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.19)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.21)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: http

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: log

Check failure on line 394 in main.go

View workflow job for this annotation

GitHub Actions / build (windows-latest, 1.20)

undefined: http
}()

rootCmd.AddCommand(generalClientCmd, serverCmd)

if err := rootCmd.Execute(); err != nil {
Expand Down

0 comments on commit d89f540

Please sign in to comment.