mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Comment profiling code
This commit is contained in:
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||||
@ -17,12 +14,12 @@ func main() {
|
|||||||
defer obiseq.LogBioSeqStatus()
|
defer obiseq.LogBioSeqStatus()
|
||||||
|
|
||||||
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
|
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||||
@ -17,12 +14,12 @@ func main() {
|
|||||||
defer obiseq.LogBioSeqStatus()
|
defer obiseq.LogBioSeqStatus()
|
||||||
|
|
||||||
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
|
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||||
@ -13,12 +10,12 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
// if err != nil {
|
// if err != nil {
|
||||||
|
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/trace"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||||
@ -22,12 +19,12 @@ func main() {
|
|||||||
// defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
trace.Start(ftrace)
|
// trace.Start(ftrace)
|
||||||
defer trace.Stop()
|
// defer trace.Stop()
|
||||||
|
|
||||||
optionParser := obioptions.GenerateOptionParser(obipairing.OptionSet)
|
optionParser := obioptions.GenerateOptionParser(obipairing.OptionSet)
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||||
@ -14,12 +11,12 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
|
@ -2,9 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obiconvert"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obitag"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obitools/obitag"
|
||||||
@ -15,12 +13,12 @@ import (
|
|||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
// go tool pprof -http=":8000" ./build/obitag ./cpu.pprof
|
// go tool pprof -http=":8000" ./build/obitag ./cpu.pprof
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
|
@ -2,9 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"runtime/pprof"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
|
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obioptions"
|
||||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiseq"
|
||||||
@ -17,12 +14,12 @@ func main() {
|
|||||||
defer obiseq.LogBioSeqStatus()
|
defer obiseq.LogBioSeqStatus()
|
||||||
|
|
||||||
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
// go tool pprof -http=":8000" ./obipairing ./cpu.pprof
|
||||||
f, err := os.Create("cpu.pprof")
|
// f, err := os.Create("cpu.pprof")
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
log.Fatal(err)
|
// log.Fatal(err)
|
||||||
}
|
// }
|
||||||
pprof.StartCPUProfile(f)
|
// pprof.StartCPUProfile(f)
|
||||||
defer pprof.StopCPUProfile()
|
// defer pprof.StopCPUProfile()
|
||||||
|
|
||||||
// go tool trace cpu.trace
|
// go tool trace cpu.trace
|
||||||
// ftrace, err := os.Create("cpu.trace")
|
// ftrace, err := os.Create("cpu.trace")
|
||||||
|
Reference in New Issue
Block a user