There are several ways to measure performance, each focusing on a different scope. Let's go through them one by one.
Benchmarks can be used to time the speed of your system in a pre-made test. Usually, they result in either a time to finish or another performance metric such as orders processed per second. There are several types of benchmarks:
- Microbenchmarks, which you can use to measure the execution of a small code fragment. We'll cover them in the next section.
- Simulations, which are synthetic tests on a larger scale with artificial data. They can be useful if you don't have access to the target data or your target hardware. For instance, when you are planning to check the performance of hardware that you're working on, but it doesn't exist yet, or when you plan to handle incoming traffic, but can only assume how the traffic will look.
- Replays, which can be a very accurate way of measuring performance under the...