Code Testing and Profiling
Programming is both an art and a science, and as such, it needs tools that help the developer generate better software and understand why some aspects of their code do not work as expected. This chapter primarily addresses code testing and code profiling with the Go programming language. The provided code profiling tools are about improving the performance of Go programs by finding and understanding bottlenecks and discovering bugs.
Code optimization is the process where one or more developers try to make certain parts of a program run faster, be more efficient, or use fewer resources. Put simply, code optimization is about eliminating the bottlenecks of a program where and when it matters. The discussion about code optimization is going to continue in Chapter 14, Efficiency and Performance, where we talk about benchmarking code.
Code testing is about making sure that your code does what you want it to do. In this chapter, we are experiencing the...