Small adjustment

This commit is contained in:
2022-10-27 11:18:44 +02:00
parent 8aa323dad5
commit f3ddac0f50
10 changed files with 218 additions and 155 deletions

View File

@ -1,7 +1,9 @@
package main
import (
"log"
"os"
"runtime/pprof"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obitag"
@ -10,6 +12,23 @@ import (
)
func main() {
// go tool pprof -http=":8000" ./build/obitag ./cpu.pprof
f, err := os.Create("cpu.pprof")
if err != nil {
log.Fatal(err)
}
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
// go tool trace cpu.trace
// ftrace, err := os.Create("cpu.trace")
// if err != nil {
// log.Fatal(err)
// }
// trace.Start(ftrace)
// defer trace.Stop()
optionParser := obioptions.GenerateOptionParser(obitag.OptionSet)
_, args, _ := optionParser(os.Args)