mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 10:22:19 +00:00
Add profiling during debugging
This commit is contained in:
parent
26e7182085
commit
e1bdae5380
4
main.go
4
main.go
@ -7,6 +7,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
|
"github.com/pkg/profile"
|
||||||
"gitlab.crans.org/nounous/ghostream/auth"
|
"gitlab.crans.org/nounous/ghostream/auth"
|
||||||
"gitlab.crans.org/nounous/ghostream/internal/config"
|
"gitlab.crans.org/nounous/ghostream/internal/config"
|
||||||
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
|
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
|
||||||
@ -20,6 +21,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
// TODO Don't always profile if not needed
|
||||||
|
defer profile.Start().Stop()
|
||||||
|
|
||||||
// Configure logger
|
// Configure logger
|
||||||
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
|
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user