Allows importing projects into IntelliJ IDEA using Build Server Protocol.
Used by experimental Bazel plugin.
WARNING the benchmarks will run headless intellij instance that will open the project you specify with repository_path setting. This means it will include its build scripts or init scripts that could run any code, so make sure you trust the project you pass to repository_path setting.
It is possible to run a benchmark that imports an arbitrary project.
Running the command below also means, you accept to send some usage statistics as described here https://www.jetbrains.com/help/idea/settings-usage-statistics.html and JetBrains products term of use https://www.jetbrains.com/legal/docs/toolbox/user.
- Create or clone a repository to
<repository_path>
- Install bazel-bsp in the repostitory, use the instructions here https://github.com/JetBrains/bazel-bsp/#installation
- Apply the benchmark patch (
git apply benchmark.patch
) - Run the following command (remember to replace <repository_path>):
./gradlew runIde --args="-Dbsp.benchmark.project.path=<repository_path> -Dbsp.benchmark.metrics.file=$PWD/metrics.txt -Djb.consents.confirmation.enabled=false -Djava.awt.headless=true -Djb.privacy.policy.text=<\!--999.999--> -Dide.show.tips.on.startup.default.value=false"
- Read the output of metrics.txt file