improved performance

This commit is contained in:
2022-08-21 13:44:09 +02:00
parent 02f445f02f
commit f1e3a68dc4
2 changed files with 16 additions and 14 deletions

View File

@ -1,9 +1,10 @@
package main
import (
log "github.com/sirupsen/logrus"
"os"
"runtime/trace"
"runtime/pprof"
log "github.com/sirupsen/logrus"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
@ -13,20 +14,20 @@ import (
func main() {
// go tool pprof -http=":8000" ./obipairing ./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")
f, err := os.Create("cpu.pprof")
if err != nil {
log.Fatal(err)
}
trace.Start(ftrace)
defer trace.Stop()
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(obipcr.OptionSet)