The four dimensions of performance engineering
The terms “performance engineering” and “performance testing” are often used interchangeably, but performance testing is just one part of the discipline of performance engineering.
Performance engineering is a broad, holistic view of performance across the entire lifecycle of an application or program and consists of four parts:
- Architecture and modeling
- Performance diagnostics and profiling
- Performance testing
- Monitoring and capacity
1. Architecture and modeling
Architecture and modeling should begin before development. This stage includes nonfunctional requirement gathering and scenario development to answer fundamental questions about the project: How many users do we expect? How many transactions and how much traffic do we expect? What performance bottlenecks are there from other integrated systems?
Starting here enables the performance architect to understand the overall design and architecture of the project from the very beginning, so they can spot and surface issues right away, before they get to development. This also gives the developer a clear picture of how the program needs to perform, so they can make the right design choices at the beginning, saving them from going back and re-architecting later in the process. For example, if a developer knows that a million records a minute need to be processed, rather than a thousand records a minute, they will make different design choices.
This phase doesn’t need to capture everything perfectly but developing a good fundamental understanding of the project will make a big difference later.
2. Performance diagnostics and profiling
Performance diagnostics and profiling are intended to identify performance weak points as early as possible in the development process and occur throughout development, including within agile sprints. Diagnostic tools allow you to dive deeply into performance at the code and function levels. For instance, they may record how long it takes for results to be returned every time someone clicks on a search button. Then, the tools can not only indicate when there is a problem but also pinpoint where the problem lies. Over time, diagnostic tools will help develop a baseline, which allows for anomaly detection. For instance, if your baseline for a search is normally 30 seconds, if it suddenly takes 60 seconds, that could indicate an issue that needs to be addressed.
When embedded into the development process, performance diagnostics are also the first opportunity to understand and diagnose performance issues for a single user, before you begin the performance testing stage for multiple users.
3. Performance testing
Performance testing looks at what happens when the program scales to multiple users. Sometimes referred to as load testing, it uses automated scripts to simulate users in increasing numbers and flag any issues. It also validates the capacity of the systems and scalability of the applications. At this point, if performance diagnostics have been completed thoroughly, many issues should have already been resolved, so problems will be solely because of load or capacity. This allows developers to more easily and quickly pinpoint and fix the source of the problem.