-
Notifications
You must be signed in to change notification settings - Fork 287
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
Move full cycle mini test to full cycle with shared params #169
Open
jonatas
wants to merge
6
commits into
master
Choose a base branch
from
parametrize-full-mini-test
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3104996
Rename full_cycle_minitest to full_cycle
jonatas 6c2c473
Extract variables and loop commands
jonatas 995be4d
Add docker commands to start the container automatically before the f…
jonatas 2ff5561
Remove docker image after tsbs
jonatas 0e2daaf
Add log interval and timestamp start and end to generate data
jonatas 7c81547
Small moves to separate the contexts
jonatas File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/bash -x | ||
# showcases the ftsb 3 phases for timescaledb | ||
# - 1) data and query generation | ||
# - 2) data loading/insertion | ||
# - 3) query execution | ||
|
||
# Auth | ||
|
||
PORT=5432 | ||
USER=postgres | ||
PASSWORD=password | ||
HOST=0.0.0.0 | ||
DATABASE_NAME=${DATABASE_NAME:-"benchmark"} | ||
|
||
|
||
CONTAINER_NAME=timescaledb_benchmark | ||
# setup pg with password and expose the default port. | ||
sudo docker run -d --name $CONTAINER_NAME -p 5432:$PORT \ | ||
-e POSTGRES_PASSWORD=$PASSWORD \ | ||
timescale/timescaledb:latest-pg12 | ||
|
||
docker start $CONTAINER_NAME | ||
sleep 2 | ||
|
||
|
||
# Setup | ||
USE_CASE=${USE_CASE:-"cpu-only"} | ||
QUERY_TYPES=(lastpoint cpu-max-all-1 high-cpu-1) | ||
SCALE=10 | ||
SEED=123 | ||
WORKERS=1 | ||
MAX_QUERIES=${MAX_QUERIES:-"1000"} | ||
|
||
# Folders setup | ||
|
||
TARGET_DATA_FOLDER=${TARGET_DATA_FOLDER:-"/tmp/bulk_data"} | ||
DATA_FILE=$TARGET_DATA_FOLDER/timescaledb_data | ||
mkdir -p $TARGET_DATA_FOLDER | ||
|
||
|
||
# generate queries | ||
$GOPATH/bin/tsbs_generate_data \ | ||
--format timescaledb \ | ||
--use-case $USE_CASE \ | ||
--scale $SCALE \ | ||
--seed $SEED \ | ||
--file $DATA_FILE | ||
|
||
for _type in "${QUERY_TYPES[@]}" | ||
do | ||
: | ||
$GOPATH/bin/tsbs_generate_queries \ | ||
--format timescaledb \ | ||
--queries ${MAX_QUERIES} \ | ||
--use-case $USE_CASE \ | ||
--scale $SCALE \ | ||
--seed $SEED \ | ||
--query-type $_type \ | ||
--file $TARGET_DATA_FOLDER/timescaledb_query_$_type | ||
done | ||
|
||
# insert benchmark | ||
$GOPATH/bin/tsbs_load_timescaledb \ | ||
--pass=${PASSWORD} \ | ||
--postgres="sslmode=disable port=${PORT}" \ | ||
--db-name=${DATABASE_NAME} \ | ||
--host=${HOST} \ | ||
--user=${USER} \ | ||
--workers=${WORKERS} \ | ||
--file=${DATA_FILE} | ||
|
||
|
||
for _type in "${QUERY_TYPES[@]}" | ||
do | ||
: | ||
# queries benchmark | ||
$GOPATH/bin/tsbs_run_queries_timescaledb \ | ||
--max-queries=${MAX_QUERIES} \ | ||
--pass=${PASSWORD} \ | ||
--postgres="sslmode=disable port=${PORT}" \ | ||
--db-name=${DATABASE_NAME} \ | ||
--hosts=${HOST} \ | ||
--user=${USER} \ | ||
--workers=${WORKERS} \ | ||
--file=$TARGET_DATA_FOLDER/timescaledb_query_$_type | ||
done | ||
|
||
# only because you're going to do benchmarks and don't wanto to persist it | ||
sudo docker rm -f $(sudo docker ps -aq --filter name=$CONTAINER_NAME) |
27 changes: 0 additions & 27 deletions
27
scripts/full_cycle_minitest/full_cycle_minitest_timescaledb.sh
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we wrap this in a check in case we're not running this locally?