Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed namespace #5

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mongodb-benchmarking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-benchmarking
namespace: perf-test
namespace: benchmarking
labels:
app: mongodb-benchmarking
spec:
Expand Down
28 changes: 17 additions & 11 deletions scripts/ycsb_load_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ ln -sf /usr/bin/python2.7 /usr/bin/python
export PATH="/usr/lib/jvm/java-21-openjdk-amd64/bin/:/usr/share/maven/bin/:$PATH"

# Default values
RECORD_COUNT_DEFAULT=500000
LOAD_THREADS_COUNT_DEFAULT=16
MONGODB_URI_DEFAULT="mongodb://localhost:21017/admin?replicaSet=mongodb"
WORKLOAD_DEFAULT="workloada"
RECORD_COUNT=500000
LOAD_THREADS_COUNT=16
MONGODB_URI="mongodb://localhost:21017/admin?replicaSet=mongodb-k8s"
WORKLOAD="workloada"

# Read parameters or use defaults
WORKLOAD=${1:-$WORKLOAD_DEFAULT}
RECORD_COUNT=${2:-$RECORD_COUNT_DEFAULT}
LOAD_THREADS_COUNT=${3:-$LOAD_THREADS_COUNT_DEFAULT}
MONGODB_URI=${4:-$MONGODB_URI_DEFAULT}
# Parse named arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
-w|--workload) WORKLOAD="$2"; shift ;;
-rc|--record-count) RECORD_COUNT="$2"; shift ;;
-lt|--load-threads-count) LOAD_THREADS_COUNT="$2"; shift ;;
-mu|--mongodb-uri) MONGODB_URI="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

# Run YCSB with specified parameters
/var/load-testing/ycsb-0.17.0/bin/ycsb \
load mongodb -s \
-P "/var/load-testing/ycsb-0.17.0/workloads/$WORKLOAD" \
-p recordcount=$RECORD_COUNT \
-threads $LOAD_THREADS_COUNT \
-p mongodb.url="$MONGODB_URI"

-p mongodb.url="$MONGODB_URI"
23 changes: 13 additions & 10 deletions scripts/ycsb_run_operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
ln -sf /usr/bin/python2.7 /usr/bin/python
export PATH="/usr/lib/jvm/java-21-openjdk-amd64/bin/:/usr/share/maven/bin/:$PATH"

# Default values
OPERATIONS_COUNT=1000000
OPERATIONS_THREADS_COUNT=2
MONGODB_URI_DEFAULT="mongodb://localhost:21017/admin?replicaSet=mongodb"
WORKLOAD_DEFAULT="workloada"

# Read parameters or use defaults
WORKLOAD=${1:-$WORKLOAD_DEFAULT}
RECORD_COUNT=${2:-$RECORD_COUNT_DEFAULT}
LOAD_THREADS_COUNT=${3:-$LOAD_THREADS_COUNT_DEFAULT}
MONGODB_URI=${4:-$MONGODB_URI_DEFAULT}

MONGODB_URI="mongodb://localhost:21017/admin?replicaSet=mongodb-k8s"
WORKLOAD="workloada"

# Parse named arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
-w|--workload) WORKLOAD="$2"; shift ;;
-oc|--operations-count) OPERATIONS_COUNT="$2"; shift ;;
-ot|--operations-threads-count) OPERATIONS_THREADS_COUNT="$2"; shift ;;
-mu|--mongodb-uri) MONGODB_URI="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

/var/load-testing/ycsb-0.17.0/bin/ycsb \
run mongodb -s \
Expand Down
Loading