Running the benchmark
As you have probably guessed, one way to run a benchmark is just to execute the main()
method. It can be done using the java
command directly or using the IDE. We talked about it in Chapter 1, Getting Started with Java 17. Yet there is an easier and more convenient way to run a benchmark: by using an IDE plugin.
Using an IDE plugin
All major Java-supporting IDEs have such a plugin. We will demonstrate how to use the plugin for IntelliJ installed on a macOS computer, but it is equally applicable to Windows systems.
Here are the steps to follow:
- To start installing the plugin, press the command key and comma (,) together, or just click the wrench symbol (with the hover text Preferences) in the top horizontal menu:
- It will open a window with the following menu in the left pane:
- Select Plugins, as shown in the preceding...