(zettel (meta (backward "00001004010000") (box-number "1") (created "20240926144556") (forward "00001004010000") (modified "20240926144951") (published "20240926144951") (role "manual") (syntax "zmk") (tags "#configuration #manual #zettelstore") (title "Zettelstore runtime profiling")) (rights 4) (encoding "") (content "For debugging purposes, you can enable runtime profiling by setting the startup configuration [[''runtime-profiling''|00001004010000#runtime-profiling]].\nTypically, a Zettelstore developer will do this.\nIn certain cases, a Zettelstore developer will ask you to enable runtime profiling, because you encountered a hard error.\n\nRuntime profiling will generate some data that can be retrieved through the builtin web server.\nThe following URL paths are valid:\n\n|=Path|Description\n|''/rtp/''|Show an index page, where you can navigate to detailed information\n|''/rtp/allocs''|Show a sampling of all past memory allocations\n|''/rtp/block''|Show stack traces that led to internal blocking\n|''/rtp/cmdline''|Show the running Zettelstore command line, with arguments separated by NUL bytes\n|''/rtp/goroutine''|Show stack traces of all current internal activities\n|''/rtp/heap''|Show a sampling of memory allocations of live objects\n|''/rtp/mutex''|Show stack traces of holders of contended mutexes\n|''/rtp/profile''|Execute a CPU profile\n|''/rtp/symbol''|Shows function names for given program counter value\n|''/rtp/trace''|Show trace of execution of the current program\n|''/rtp/threadcreate''|Show stack traces that led to the creation of new OS threads\n\nSee documentation for Go standard package [[''net/http/pprof''|https://pkg.go.dev/net/http/pprof]]."))