mirror of
https://github.com/php/frankenphp.git
synced 2026-03-24 00:52:11 +01:00
add more logging
This commit is contained in:
@@ -510,14 +510,16 @@ var conReqs atomic.Int32
|
||||
func go_fetch_and_execute(rh unsafe.Pointer) {
|
||||
//logger.Warn("Starting fetch and execute")
|
||||
|
||||
start := time.Now()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-done:
|
||||
return
|
||||
case r := <-requestChan:
|
||||
conReqs.Add(1)
|
||||
start := time.Now()
|
||||
logger.Warn("Executing request", zap.Int("total", int(conReqs.Load())))
|
||||
logger.Warn("Executing request", zap.Int("total", int(conReqs.Load())), zap.Duration("elapsed", time.Since(start)))
|
||||
start = time.Now()
|
||||
fc, ok := FromContext(r.Context())
|
||||
handle := cgo.NewHandle(r)
|
||||
r.Context().Value(handleKey).(*handleList).AddHandle(handle)
|
||||
@@ -539,6 +541,7 @@ func go_fetch_and_execute(rh unsafe.Pointer) {
|
||||
conReqs.Add(-1)
|
||||
|
||||
logger.Warn("finished execution", zap.Int("total", int(conReqs.Load())), zap.Duration("elapsed", time.Since(start)))
|
||||
start = time.Now()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user