Performance optimization is a job that is never done. Applications are constantly evolving, developing new features, and adapting to new business requirements. This adds complexity and introduces new, often unexpected behaviors into the system. Optimizations done previously may no longer apply, or be offset by performance degradation elsewhere, due to new interactions. The discipline of long-term profiling allows us to keep the degradations in check, detect them early, and fix them before they become a real problem.
The simplest step toward long-term profiling is to monitor trends in performance. If we plot the p99.9 latency of an endpoint today and compare it with a plot captured last month, do we see more recent plots being consistently higher? Then we have a degradation. However, we know better by now than to compare two numbers, so instead, we can compare the distributions of latency, via histograms. Do we see today's histogram shifting toward the long tail? Then we...