mirror of
https://github.com/1f349/violet.git
synced 2024-12-21 23:14:04 +00:00
Record the number of currently running goroutines
This commit is contained in:
parent
869d114891
commit
8c4aa67e7b
@ -11,6 +11,7 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"path"
|
||||
"runtime"
|
||||
"time"
|
||||
)
|
||||
|
||||
@ -18,7 +19,7 @@ import (
|
||||
// endpoints for the reverse proxy.
|
||||
func NewHttpsServer(conf *conf.Conf) *http.Server {
|
||||
r := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
|
||||
log.Printf("[Debug] Request: %s - '%s' - '%s' - '%s' - len: %d\n", req.Method, req.URL.String(), req.RemoteAddr, req.Host, req.ContentLength)
|
||||
log.Printf("[Debug] Request: %s - '%s' - '%s' - '%s' - len: %d - thread: %d\n", req.Method, req.URL.String(), req.RemoteAddr, req.Host, req.ContentLength, runtime.NumGoroutine())
|
||||
conf.Router.ServeHTTP(rw, req)
|
||||
})
|
||||
favMiddleware := setupFaviconMiddleware(conf.Favicons, r)
|
||||
|
Loading…
Reference in New Issue
Block a user