Documentation
¶
Overview ¶
Package profiler turns the SPX profiler on or off globally. Arming flips a config flag and regenerates every PHP-FPM site's nginx vhost so the SPX_ENABLED cookie is injected into each request; disarming reverses it. No FPM restart is involved, only an nginx reload.
Index ¶
Constants ¶
const SpxUIURL = "http://profiler.localhost/?SPX_UI_URI=/"
SpxUIURL is the standalone SPX profiler web UI, served by the profiler.localhost nginx vhost. The dashboard embeds the same UI same-origin under /_spx/; this URL opens it directly (lerd profile open, MCP status).
Variables ¶
This section is empty.
Functions ¶
func ClearData ¶
ClearData deletes every captured SPX report from the profiler data directory. The directory itself is kept so the read-write bind mount into each FPM container stays valid; only its contents go. A missing or empty directory is not an error. Returns how many top-level entries were removed.
Types ¶
type Result ¶
Result reports the outcome of a SetProfiling call.
func SetProfiling ¶
SetProfiling turns the SPX profiler on or off globally. When on, every PHP-FPM site's requests are profiled. The change regenerates each FPM site's vhost and reloads nginx.