When we fix a bug in the code we typically add a test in order to ensure that the bug never gets accidentally re-introduced. But what about verifying performance optimizations? Typically when we optimize a performance bottleneck, we manually profile the results and then commit our changes.
What if we could add tests that characterized the code’s expected performance profile, and failed if it ever deviates from those expectations? Our guest today, Piotr Murach, has creates some tools to do just that, and he’s going to show you how to use them to make your performance expectations testable. Enjoy!