The pprof tools allows Go applications to collect and export runtime profiling data. It also provides web hooks to access the tool from a web interface. This recipe will create a basic application that verifies a bcrypt hashed password against a plaintext one, then it will profile the application.
You might expect the pprof tool to be in the Chapter 10, Distributed Systems,with other metrics and monitoring recipes. It was instead put in this chapter because it will be used to analyze and improve a program much in the same way benchmarking can be used. As a result, this recipe will largely focus on pprof for analyzing and improving the memory usage of an application.