Command line flags for profiling the application
If you want to measure potential bottlenecks within the software Zettelstore, there are two command line flags for enabling the measurement (also called profiling):
- -cpuprofile FILE
Enables CPU profiling. FILE must be the name of the file where the data is stored.
- -memprofile FILE
Enables memory profiling. FILE must be the name of the file where the data is stored.
Normally, profiling will stop when you stop the software Zettelstore. The given FILE can be used to analyze the data via the tool
go tool pprof FILE.
Please notice that -cpuprofile takes precedence over -memprofile. You cannot measure both.
You also can use the administrator console to begin and end profiling manually for a already running Zettelstore.