memgraph/tests/public_benchmark/ldbc/run_benchmark
Marko Budiselic a8e0792609 LDBC
Summary: Add LDBC helper scripts.

Reviewers: teon.banek, mferencevic, mislav.bradac

Reviewed By: teon.banek

Subscribers: pullbot, buda

Differential Revision: https://phabricator.memgraph.io/D563
2017-08-28 09:34:22 +02:00

68 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
# Run the LDBC SNB interactive workload / benchmark.
# The benchmark is executed with:
# * ldbc_driver -> workload executor
# * ldbc-snb-impls/snb-interactive-neo4j -> workload implementation
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function print_help () {
echo "Usage: $0 [OPTION]"
echo "Optional arguments:"
echo -e " -h|--help -> Prints help."
echo -e " --host -> Database host."
echo -e " --port -> Database port."
echo -e " --time-compression-ratio |"
echo -e " --operation-count | -> https://github.com/ldbc/ldbc_driver/wiki/Driver-Configuration"
echo -e " --thread-count |"
}
# Default parameters.
host=127.0.0.1
port=7687
time_compression_ratio=0.01
operation_count=100
thread_count=8
# Read the arguments.
while [[ $# -gt 0 ]]
do
case $1 in
-h|--help)
print_help
exit 1
;;
--host)
host=$2
shift
;;
--port)
port=$2
shift
;;
--time-compression-ratio)
time_compression_ratio=$2
shift
;;
--operation-count)
operation_count=$2
shift
;;
--thread-count)
thread_count=$2
shift
;;
*)
# unknown option
;;
esac
shift # past argument or value
done
cd ${script_dir}/ldbc-snb-impls
mvn clean compile assembly:single
cd ${script_dir}/ldbc_driver
java -cp target/jeeves-0.3-SNAPSHOT.jar:${script_dir}/ldbc-snb-impls/snb-interactive-neo4j/target/snb-interactive-neo4j-1.0.0-jar-with-dependencies.jar com.ldbc.driver.Client -P ${script_dir}/ldbc_driver/configuration/ldbc_driver_default.properties -P ${script_dir}/ldbc-snb-impls-test.properties -P ${script_dir}/ldbc_snb_datagen/social_network/updateStream.properties -p host ${host} -p port ${port} -db net.ellitron.ldbcsnbimpls.interactive.neo4j.Neo4jDb -p ldbc.snb.interactive.parameters_dir ${script_dir}/ldbc_snb_datagen/substitution_parameters --time_compression_ratio ${time_compression_ratio} --operation_count ${operation_count} --thread_count ${thread_count}