Many times you may be testing parts of your code that have service dependency that run for an unknown amount of time.
Examples of these may be task queues, distributed system calls, etc.
Because you don't know how long they may take to execute, testing them can present some challenges.
In this module we will learn how to set up tests both effectively and efficiently for testing async processes.
It's easy to decouple packages in Go using interfaces. Because of this, testing can also be much easier. However, you typically want to mock out your interfaces in tests so that unit testing is much easier. This chapter will cover how to write a mock for a service to enable easy and precise testing.
Go comes with a powerful set of tools for profiling and improving the performance of your code. Benchmarking is one of those tools, and the first one most developers start with. In this module we will cover basic benchmarking, some common benchmarking mistakes, and how to compare benchmarks to se...
Go ships with a number of profiling tools. This chapter will walk you through how to:
* Use interactive pprof with a cpu profile
* Use interactive pprof with different types of memory profiles
* Generate profiles from benchmarks
* Generate profiles from live/running applications
* Generate...