Title here
Summary here
devMode turns on two things, for a local instance or a controlled troubleshooting session. Never turn it on in
production.
| What | Purpose |
|---|---|
POST /reset | Deletes every event and projection, and draws a new store ID |
/debug/pprof/* | Go’s standard profiling endpoints (CPU, heap, goroutine, and so on) |
devMode off, neither exists: a request to either gets the plain 404 of any unknown path.enableAuth is on, both need the token like every other route.devMode on only for as long as you need it, then turn it back off.Why profiling is dev-mode-only. The profiling endpoints only read the running process, not the database, and run outside the write FIFO. But a CPU or heap profile can reveal data flowing through a live request.
With devMode on, start a CPU profile, then send the request to look at from another terminal while it collects
samples:
go tool pprof -http=:0 "http://127.0.0.1:8085/debug/pprof/profile?seconds=30"seconds then).QUERY /events page, also check /debug/pprof/allocs./debug/pprof/trace?seconds=30 with go tool trace.