Testing and Performance

Testing and Performance

This course will take you show you how to profile your Go code. Starting with basic benchmarks, all the way through system and memory profiling. Continue even further by using and understanding flame graphs

Subscribe Share
Testing and Performance
  • Testing

    Go ships with a powerful testing framework. Tests in Go are written in the Go language, so there is no need to learn another syntax. This module will explore basic tests, table driven tests, and sub-tests. Concepts such as race conditions, code coverage, test automation. Understanding test option...

  • Asynchronous Testing

    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.


  • Mocking Tests

    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.

  • Benchmarking

    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...

  • Profiling

    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...