mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
project restructuring
This commit is contained in:
10
nb-engine/nb-engine-cli/bin/eb
Executable file
10
nb-engine/nb-engine-cli/bin/eb
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
MYSELF=`which "$0" 2>/dev/null`
|
||||
[ $? -gt 0 -a -f "$0" ] && MYSELF="./$0"
|
||||
java=java
|
||||
if test -n "$JAVA_HOME"; then
|
||||
java="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
#printf "java='%s' java_args='%s' MYSELF='%s'\n" "${java}" "${java_args}" "${MYSELF}"
|
||||
exec "$java" $java_args -jar $MYSELF "$@"
|
||||
exit 1
|
||||
62
nb-engine/nb-engine-cli/bin/run-eb
Executable file
62
nb-engine/nb-engine-cli/bin/run-eb
Executable file
@@ -0,0 +1,62 @@
|
||||
#!/bin/bash
|
||||
|
||||
export AUTO_INSTALL=${AUTO_INSTALL:-"true"}
|
||||
export FORCE_INSTALL=${FORCE_INSTALL:-"false"}
|
||||
export FETCH_ONLY=${FETCH_ONLY:-"false"}
|
||||
export STALE_DAYS=${STALE_DAYS:-"2"}
|
||||
|
||||
if ! which curl >> /dev/null 2>&1
|
||||
then
|
||||
printf "$0 requires curl to be in the path.\n";
|
||||
exit 2
|
||||
fi
|
||||
|
||||
export NB_JARNAME="nb.jar"
|
||||
|
||||
DOINSTALL="false"
|
||||
if [ ! -f "${NB_JARNAME}" -a "${AUTO_INSTALL}" = "true" ]
|
||||
then DOINSTALL="true"
|
||||
elif [ "${FORCE_INSTALL}" = "true" ]
|
||||
then DOINSTALL="true"
|
||||
elif find ${NB_JARNAME} -mtime ${STALE_DAYS} | grep ${NB_JARNAME}
|
||||
# 2>&1 >>/dev/null
|
||||
then
|
||||
DOINSTALL="true"
|
||||
printf "forcing download because the jar is more than %s days old\n" ${STALE_DAYS}
|
||||
fi
|
||||
|
||||
if [ "${DOINSTALL}" = "true" ]
|
||||
then
|
||||
|
||||
export central_runtime_version=$(
|
||||
curl -s -L \
|
||||
'http://search.maven.org/solrsearch/select?q=g:"io
|
||||
.nosqlbench"%20AND%20a:"engine-cli"%20AND%20p:"jar"&wt=json&rows=1' \
|
||||
| perl -pe 'if (/"latestVersion":"([\d\.]+?)"/) { $_ = $1 } else {$_="nope"}'
|
||||
)
|
||||
export DOWNLOAD_VERSION=${central_runtime_version:?"Unable to find a downloadable version via maven central search."}
|
||||
printf 'Downloading version: %s\n...' ${DOWNLOAD_VERSION} 1>&2
|
||||
export DOWNLOAD_URL="https://repo1.maven
|
||||
.org/maven2/io/nosqlbench/engine-cli/${DOWNLOAD_VERSION}/engine-cli-$
|
||||
{DOWNLOAD_VERSION}.jar"
|
||||
printf 'Download URL: %s\n' ${DOWNLOAD_URL}
|
||||
|
||||
printf 'fetching nosqlbench CLI from %s...\n' "${DOWNLOAD_URL}" 1>&2
|
||||
|
||||
(
|
||||
cd /tmp ;
|
||||
curl -s -L -o 'nb.jar' "${DOWNLOAD_URL}"
|
||||
)
|
||||
mv /tmp/nb.jar ${NB_JARNAME}
|
||||
printf "The NB jar has been saved as %s\n" ${NB_JARNAME}
|
||||
fi
|
||||
|
||||
if [ "${FETCH_ONLY}" = "true" ]
|
||||
then
|
||||
printf "fetching client only, exiting\n" 1>&2
|
||||
exit 0;
|
||||
fi;
|
||||
|
||||
java -jar ${NB_JARNAME} \
|
||||
$*
|
||||
|
||||
18
nb-engine/nb-engine-cli/bin/sanitycheck.js
Normal file
18
nb-engine/nb-engine-cli/bin/sanitycheck.js
Normal file
@@ -0,0 +1,18 @@
|
||||
scenario.start('type=diag;alias=test;min=1;max=10000000;threads=10;interval=2000;');
|
||||
|
||||
print('waiting 2000 ms');
|
||||
scenario.waitMillis(2000);
|
||||
print('waited');
|
||||
|
||||
activities.test.interval=1000;
|
||||
activities.test.threads=2;
|
||||
|
||||
print('waiting 2000 ms');
|
||||
scenario.waitMillis(2000);
|
||||
|
||||
activities.test.threads=20;
|
||||
activities.test.interval=500;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user