MCPcopy Index your code
hub / github.com/php/frankenphp / DebugState

Function DebugState

debugstate.go:31–45  ·  view source on GitHub ↗

EXPERIMENTAL: DebugState prints the state of all PHP threads - debugging purposes only

()

Source from the content-addressed store, hash-verified

29
30// EXPERIMENTAL: DebugState prints the state of all PHP threads - debugging purposes only
31func DebugState() FrankenPHPDebugState {
32 fullState := FrankenPHPDebugState{
33 ThreadDebugStates: make([]ThreadDebugState, 0, len(phpThreads)),
34 ReservedThreadCount: 0,
35 }
36 for _, thread := range phpThreads {
37 if thread.state.Is(state.Reserved) {
38 fullState.ReservedThreadCount++
39 continue
40 }
41 fullState.ThreadDebugStates = append(fullState.ThreadDebugStates, threadDebugState(thread))
42 }
43
44 return fullState
45}
46
47// threadDebugState creates a small jsonable status message for debugging purposes
48func threadDebugState(thread *phpThread) ThreadDebugState {

Callers 1

threadsMethod · 0.92

Calls 2

threadDebugStateFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected