Commits

Anonymous committed d77e3c9

remove pprof usage

Comments (0)

Files changed (1)

cmd/groot-ls/main.go

 import (
 	"flag"
 	"fmt"
-	"log"
+	//"log"
 	"os"
-	"runtime/pprof"
+	//"runtime/pprof"
 	"strings"
 
 	"bitbucket.org/binet/go-root/pkg/groot"
 )
 
 var fname = flag.String("f", "ntuple.root", "ROOT file to inspect")
-var cpuprofile = flag.String("cpuprofile", "cpu.prof", "write cpu profile to file")
+//var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")
 
 func normpath(path []string) string {
 	name := strings.Join(path, "/")
 	fmt.Printf(":: groot-ls ::\n")
 	flag.Parse()
 
-	if *cpuprofile != "" {
-        f, err := os.Create(*cpuprofile)
-        if err != nil {
-            log.Fatal(err)
-        }
-        pprof.StartCPUProfile(f)
-        defer pprof.StopCPUProfile()
-    }
+	// if *cpuprofile != "" {
+    //     f, err := os.Create(*cpuprofile)
+    //     if err != nil {
+    //         log.Fatal(err)
+    //     }
+    //     pprof.StartCPUProfile(f)
+    //     defer pprof.StopCPUProfile()
+    // }
 
 	f, err := groot.NewFileReader(*fname)
 	if err != nil {