TinkerBench is a benchmarking tool designed Graph databases based on Apache TinkerPop. It provides an efficient way to measure Gremlin Query performance in an easy and flexible manner.
TinkerBench provides all the necessary performance metrics of the query. It provides latency, rate, count, and error information. This information is delivered in real time on the console or within a Granfa dashboard. Information can be captured in a log file for post-processing or historical reference.
TinkerBench has two different ways to provide the Gremlin Query for analysis.
- As a query String -- Pass the actual query string by means of the command line for execution. The query is compiled and that result is used for measurement. Static or random vertex identifiers can be used in the query.
- Java Jar – Provide a Java Jar file using the TinkerBench framework. With this method, you can pass the name of the custom query class by means of the command line for execution. This method provides an advanced way to handle complex configurations, complex queries, vertex/edge management, etc. The framework handles mundane things like measurements, error handling, logging, user interface, etc. The developer only needs to focus on the desired query behavior.
To be able to execute a query, a dataset must be loaded prior to execution. Loading can be achieved by means of the Aerospike Bulk Loader or importing a Gremlin CSV format file.
TinkerBench requires Java 21.
These examples assume the Air Routes dataset has been loaded.
Displays detail help on every argument.
java tinkerbench-1.0.0-jar-with-dependencies.jar --help
Displays version information for TinkerBench and TinkerPop modules
java tinkerbench-1.0.0-jar-with-dependencies.jar --version
Displays details on predefined queries.
java tinkerbench-1.0.0-jar-with-dependencies.jar list
This example runs the predefined query "AirRoutesQuery1" using the default workload duration of 15 minutes at a 100 Queries per Second rate. No warm up will be performed.
java tinkerbench-1.0.0-jar-with-dependencies.jar AirRoutesQuery1
This example runs the predefined query "AirRoutesQuery1" using the default workload duration of 15 minutes at a 100 Queries per Second rate. A warm up 1 minute warm up will be performed before the workload is executed.
java tinkerbench-1.0.0-jar-with-dependencies.jar AirRoutesQuery1 -wu 1M
This example runs the Gremlin string query using the default workload duration of 15 minutes at a 500 Queries per Second rate. A warm up 2 minute (120 seconds) warm up will be performed before the workload is executed.
java tinkerbench-1.0.0-jar-with-dependencies.jar "g.V(%s).out().limit(5).path().by(values('code','city').fold()).toList()" -wu 120 -qps 500
This example runs the predefined query "AirRoutesQuery1" using the default workload duration of 15 minutes at a 100 Queries per Second rate. No warm up will be performed. Connect to three nodes in the Graph cluster.
java tinkerbench-1.0.0-jar-with-dependencies.jar AirRoutesQuery1 -n 10.0.0.1 -n 10.0.0.2 -n 10.0.0.3