(((meta (@ (content . "Zettelstore runtime profiling") (name . "title"))) (meta (@ (content . "manual") (name . "role"))) (meta (@ (content . "#configuration #manual #zettelstore") (name . "tags"))) (meta (@ (content . "zmk") (name . "syntax"))) (meta (@ (content . "00001004010000") (name . "backward"))) (meta (@ (content . "1") (name . "box-number"))) (meta (@ (content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta (@ (content . "20240926144556") (name . "created"))) (meta (@ (content . "00001004010000") (name . "forward"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20240926144951") (name . "modified"))) (meta (@ (content . "20240926144951") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (p "For debugging purposes, you can enable runtime profiling by setting the startup configuration " (a (@ (href . "00001004010000#runtime-profiling")) (kbd "runtime-profiling")) "." " " "Typically, a Zettelstore developer will do this." " " "In certain cases, a Zettelstore developer will ask you to enable runtime profiling, because you encountered a hard error.") (p "Runtime profiling will generate some data that can be retrieved through the builtin web server." " " "The following URL paths are valid:") (table (thead (tr (th "Path") (th "Description"))) (tbody (tr (td (kbd "/rtp/")) (td "Show an index page, where you can navigate to detailed information")) (tr (td (kbd "/rtp/allocs")) (td "Show a sampling of all past memory allocations")) (tr (td (kbd "/rtp/block")) (td "Show stack traces that led to internal blocking")) (tr (td (kbd "/rtp/cmdline")) (td "Show the running Zettelstore command line, with arguments separated by NUL bytes")) (tr (td (kbd "/rtp/goroutine")) (td "Show stack traces of all current internal activities")) (tr (td (kbd "/rtp/heap")) (td "Show a sampling of memory allocations of live objects")) (tr (td (kbd "/rtp/mutex")) (td "Show stack traces of holders of contended mutexes")) (tr (td (kbd "/rtp/profile")) (td "Execute a CPU profile")) (tr (td (kbd "/rtp/symbol")) (td "Shows function names for given program counter value")) (tr (td (kbd "/rtp/trace")) (td "Show trace of execution of the current program")) (tr (td (kbd "/rtp/threadcreate")) (td "Show stack traces that led to the creation of new OS threads")))) (p "See documentation for Go standard package " (a (@ (href . "https://pkg.go.dev/net/http/pprof") (rel . "external")) (kbd "net/http/pprof")) "."))