mirror of
https://github.com/schollz/croc.git
synced 2025-10-10 21:01:02 +02:00
bug fix: prevent crazy number of bytes getting into comm
This commit is contained in:
parent
44c3d43fa0
commit
b60a841044
2 changed files with 26 additions and 3 deletions
16
main.go
16
main.go
|
@ -13,7 +13,21 @@ import (
|
|||
|
||||
func main() {
|
||||
// "github.com/pkg/profile"
|
||||
// defer profile.Start(profile.CPUProfile).Stop()
|
||||
// go func() {
|
||||
// for {
|
||||
// f, err := os.Create("croc.pprof")
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// runtime.GC() // get up-to-date statistics
|
||||
// if err := pprof.WriteHeapProfile(f); err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
// f.Close()
|
||||
// time.Sleep(3 * time.Second)
|
||||
// fmt.Println("wrote profile")
|
||||
// }
|
||||
// }()
|
||||
if err := cli.Run(); err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue