Skip to content

Commit

Permalink
fix benchmark docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danthe1st committed Sep 24, 2024
1 parent 9d4e4d8 commit f5d22f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arebac-neo4j/Benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ java -cp target/classes:target/test-classes:target/all-dependencies/*:target/are

In order to run a single benchmark, the name of the benchmark needs to be added as an additional argument:
```bash
java -cp target/classes:target/test-classes:target/all-dependencies/*:target/arebac-neo4j-0.0.1-SNAPSHOT.jar org.openjdk.jmh.Main io.github.danthe1st.arebac.neo4j.tests.SOBenchmark.gpEval
java -cp target/classes:target/test-classes:target/all-dependencies/*:target/arebac-neo4j-0.0.1-SNAPSHOT.jar org.openjdk.jmh.Main io.github.danthe1st.arebac.neo4j.tests.stackoverflow.SOBenchmark.gpEval
```

It is also possible to run all benchmarks in a specific class or package.
Expand All @@ -21,7 +21,7 @@ It is also possible to run all benchmarks in a specific class or package.

In order to profile a specific benchmark using [`async-profiler`](https://github.com/async-profiler/async-profiler), first download and extract `async-profiler` and then use the following command (replace `/PATH/TO/async-profiler` with the path you extracted `async-profiler` to):
```java
java -cp target/classes:target/test-classes:target/all-dependencies/*:target/arebac-neo4j-0.0.1-SNAPSHOT.jar org.openjdk.jmh.Main io.github.danthe1st.arebac.neo4j.tests.SOBenchmark -f 1 -jvmArgs '-agentpath:/PATH/TO/async-profiler/lib/libasyncProfiler.so=start,event=cpu,file=profile.html'
java -cp target/classes:target/test-classes:target/all-dependencies/*:target/arebac-neo4j-0.0.1-SNAPSHOT.jar io.github.danthe1st.arebac.neo4j.tests.airbnb.AirbnbBenchmark.scenario1GetReviewsFromHostGPEval -f 1 -jvmArgs '-agentpath:/PATH/TO/async-profiler/lib/libasyncProfiler.so=start,event=cpu,file=profile.html'
```
This configures JMH to only use a single fork and attaches async-profiler to create a CPU flamegraph in a `profile.html` file. The above example runs the benchmarks specified in the `SOBenchmark` class.

0 comments on commit f5d22f3

Please sign in to comment.