Skip to content

Commit f4df5a2

Browse files
author
gnmahanth
committed
remove memory profile code from cmd/syft/main.go
1 parent 7c4d1ed commit f4df5a2

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

cmd/syft/main.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ package main
22

33
import (
44
"log"
5-
"os"
6-
"runtime"
7-
"runtime/pprof"
85

96
"github.com/anchore/syft/cmd/syft/cli"
107
)
@@ -18,13 +15,4 @@ func main() {
1815
if err := cli.Execute(); err != nil {
1916
log.Fatalf("error during command execution: %v", err)
2017
}
21-
f, err := os.Create("mem.pprof")
22-
if err != nil {
23-
log.Fatal("could not create memory profile: ", err)
24-
}
25-
defer f.Close() // error handling omitted for example
26-
runtime.GC() // get up-to-date statistics
27-
if err := pprof.WriteHeapProfile(f); err != nil {
28-
log.Fatal("could not write memory profile: ", err)
29-
}
3018
}

0 commit comments

Comments
 (0)