This chapter has covered benchmarking and tuning. We have motivated the need for benchmarking, mostly since having a benchmark framework in place prevents performance regressions, but also because well understood and easy-to-setup sub-problems are simpler to work with than complex applications. We also stressed the importance of having performance goals for commercial software development, another area where benchmarking is of a great help. It can also be useful to maintain a set of third-party applications as part of a benchmark suite.
We have discussed micro benchmarks to some extent and explained why they are useful and when they are not. We also talked about the importance of knowing what you are measuring.
Profiling always needs to be done to understand where the bottlenecks are in an application and to make sure that external benchmarks really address these bottlenecks. Profiling can be done with several levels of complexity, and with several levels of intrusiveness. For JRockit...