mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-28 15:32:00 +00:00
document profiling
This commit is contained in:
parent
52bc59aee9
commit
368b7c9f41
3 changed files with 22 additions and 4 deletions
|
@ -1,9 +1,10 @@
|
|||
package server
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func StartProfilingServer(listeningAddress string) {
|
||||
|
@ -12,7 +13,9 @@ func StartProfilingServer(listeningAddress string) {
|
|||
Handler: http.DefaultServeMux,
|
||||
}
|
||||
|
||||
log.Info().Msgf("Starting debug server on %s", listeningAddress)
|
||||
|
||||
go func() {
|
||||
log.Fatal(server.ListenAndServe())
|
||||
log.Fatal().Err(server.ListenAndServe()).Msg("Failed to start debug server")
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue