diff --git a/tests/public_benchmark/ldbc/build_dataset b/tests/public_benchmark/ldbc/build_dataset new file mode 100755 index 000000000..374e86c67 --- /dev/null +++ b/tests/public_benchmark/ldbc/build_dataset @@ -0,0 +1,144 @@ +#!/bin/bash + +# Generate SNB dataset. + +function print_help () { + echo "Usage: $0 [OPTION]" + echo "Optional arguments:" + echo -e " -h|--help -> Prints help." + echo -e " --scale-factor Positive_Integer -> Defines the dataset size." + echo -e " --neo4j-home Neo4j home directory, overrides NEO4J_HOME" + echo -e " --memgraph-home Memgraph home directory." + echo -e " --skip-generating Only transform generated dataset" +} + +set -e +script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# Read the arguments. +scale_factor=1 +skip_generating=false +memgraph_dir="${script_dir}/../../.." +while [[ $# -gt 0 ]] +do + case $1 in + -h|--help) + print_help + exit 1 + ;; + --scale-factor) + scale_factor=$2 + shift + ;; + --neo4j-home) + NEO4J_HOME=$2 + shift + ;; + --memgraph-home) + memgraph_dir=$2 + shift + ;; + --skip-generating) + skip_generating=true + ;; + *) + # unknown option + ;; + esac + shift # past argument or value +done + +echo "Using scale_factor" $scale_factor +# Prepare the folder structure. +dataset_folder_prefix="neo4j_csv_dataset" +dataset_folder="${script_dir}/${dataset_folder_prefix}_scale_${scale_factor}" +mkdir -p ${dataset_folder} + +# Define scale factor. +cat > ${script_dir}/ldbc_snb_datagen/params.ini < Prints help." - echo -e " --scale-factor Positive_Integer -> Defines the dataset size." -} - -set -e -script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Read the arguments. -scale_factor=1 -while [[ $# -gt 0 ]] -do - case $1 in - -h|--help) - print_help - exit 1 - ;; - --scale-factor) - scale_factor=$2 - shift - ;; - *) - # unknown option - ;; - esac - shift # past argument or value -done - -echo "Using scale_factor" $scale_factor -# Prepare the folder structure. -dataset_folder_prefix="neo4j_csv_dataset" -dataset_folder="${script_dir}/${dataset_folder_prefix}_scale_${scale_factor}" -mkdir -p ${dataset_folder} -rm -rf ${dataset_folder}/* - -# Define scale factor. -cat > ${script_dir}/ldbc_snb_datagen/params.ini <