#!/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 |" echo -e " --result-file-prefix -> Result file prefix." echo -e " --properties-file -> Properties file used to select queries" } # Default parameters. host=127.0.0.1 port=7687 time_compression_ratio=0.01 operation_count=200 thread_count=8 result_file_prefix="undefined" properties_file="${script_dir}/ldbc-snb-impls-short-reads.properties" # Read the arguments. while [[ $# -gt 0 ]] do case $1 in -h|--help) print_help exit 1 ;; --host) host=$2 shift ;; --port) port=$2 shift ;; --result-file-prefix) result_file_prefix=$2 shift ;; --properties-file) properties_file=$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 ${properties_file} -p ldbc.snb.interactive.updates_dir ${script_dir}/ldbc_snb_datagen/social_network -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} cp ${script_dir}/ldbc_driver/results/LDBC-results.json ${script_dir}/results/${result_file_prefix}-LDBC-results.json