mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 15:21:02 +00:00
Merge pull request #1373 from molecula/bench
Update keyed/unkeyed benchmarks
This commit is contained in:
commit
c75d5553b9
6 changed files with 73 additions and 13 deletions
|
|
@ -21,7 +21,7 @@ SHA=$(git -C $PILOSA_SRC rev-parse HEAD)
|
|||
# Format current date.
|
||||
DATE=$(date '+%Y%m%d')
|
||||
|
||||
for TYPE in row row-bsi row-range count intersect union difference xor groupby topk
|
||||
for TYPE in row row-bsi row-range count count-keyed intersect union difference xor groupby topk
|
||||
do
|
||||
WORKFLOW_PATH="${BASH_SOURCE%/*}/etc/gloat/query.${TYPE}.yml"
|
||||
WORKFLOW_NAME="$(gloat workflow name $WORKFLOW_PATH)"
|
||||
|
|
|
|||
|
|
@ -21,19 +21,22 @@ SHA=$(git -C $PILOSA_SRC rev-parse HEAD)
|
|||
# Format current date.
|
||||
DATE=$(date '+%Y%m%d')
|
||||
|
||||
WORKFLOW_PATH="${BASH_SOURCE%/*}/etc/gloat/gh.1m.yml"
|
||||
WORKFLOW_NAME="$(gloat workflow name $WORKFLOW_PATH)"
|
||||
TITLE="RBF vs Roaring, $WORKFLOW_NAME, $DATE ($SHA)"
|
||||
for FILENAME in gh.1m.yml gh.issues.keyed.yml gh.issues.unkeyed.yml
|
||||
do
|
||||
WORKFLOW_PATH="${BASH_SOURCE%/*}/etc/gloat/${FILENAME}"
|
||||
WORKFLOW_NAME="$(gloat workflow name $WORKFLOW_PATH)"
|
||||
TITLE="RBF vs Roaring, $WORKFLOW_NAME, $DATE ($SHA)"
|
||||
|
||||
# Execute RBF/Roaring benchmark.
|
||||
RBF_PATH=gloat/data/1m/rbf/${DATE}.tar.gz
|
||||
TXSRC=rbf gloat run -v -o $RBF_PATH $WORKFLOW_PATH
|
||||
# Execute RBF/Roaring benchmark.
|
||||
RBF_PATH=gloat/data/1m/rbf/${DATE}.tar.gz
|
||||
TXSRC=rbf gloat run -v -o $RBF_PATH $WORKFLOW_PATH
|
||||
|
||||
ROARING_PATH=gloat/data/1m/roaring/${DATE}.tar.gz
|
||||
TXSRC=roaring gloat run -v -o $ROARING_PATH $WORKFLOW_PATH
|
||||
ROARING_PATH=gloat/data/1m/roaring/${DATE}.tar.gz
|
||||
TXSRC=roaring gloat run -v -o $ROARING_PATH $WORKFLOW_PATH
|
||||
|
||||
# Generate graph from results.
|
||||
gloat graph -layout 2,5 -size 5120,820 -title "$TITLE" -name utime,stime,heap_alloc,heap_inuse,heap_objects,num_gc,rchar,wchar,syscr,syscw -series rbf,roaring -o /tmp/output.png $RBF_PATH $ROARING_PATH
|
||||
# Generate graph from results.
|
||||
gloat graph -layout 2,5 -size 5120,820 -title "$TITLE" -name utime,stime,heap_alloc,heap_inuse,heap_objects,num_gc,rchar,wchar,syscr,syscw -series rbf,roaring -o /tmp/output.png $RBF_PATH $ROARING_PATH
|
||||
|
||||
# Post graph to Slack with SHA.
|
||||
curl -F file=@/tmp/output.png -F channels=C01HBFKRLGH -F "initial_comment=$TITLE" -H "Authorization: Bearer $SLACK_OAUTH_TOKEN" https://slack.com/api/files.upload
|
||||
# Post graph to Slack with SHA.
|
||||
curl -F file=@/tmp/output.png -F channels=C01HBFKRLGH -F "initial_comment=$TITLE" -H "Authorization: Bearer $SLACK_OAUTH_TOKEN" https://slack.com/api/files.upload
|
||||
done
|
||||
9
scripts/etc/gloat/gh.issues.keyed.yml
Normal file
9
scripts/etc/gloat/gh.issues.keyed.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
name: "GitHub Issues Import Load Testing (1 month, keyed)"
|
||||
|
||||
main: "pilosa server --data-dir ${TMPDIR} --txsrc ${TXSRC}"
|
||||
load: "molecula-consumer-github -i issues -r url --record-type issue --batch-size=100000 --start-time 2020-01-01T00:00:00Z --end-time 2020-01-13T23:00:00Z --cache-dir ~/.githubarchive"
|
||||
|
||||
health_url: "http://localhost:10101/status"
|
||||
vars_urls:
|
||||
- http://localhost:10101/debug/vars
|
||||
- http://localhost:7070/debug/vars
|
||||
9
scripts/etc/gloat/gh.issues.unkeyed.yml
Normal file
9
scripts/etc/gloat/gh.issues.unkeyed.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
name: "GitHub Issues Import Load Testing (1 month, unkeyed)"
|
||||
|
||||
main: "pilosa server --data-dir ${TMPDIR} --txsrc ${TXSRC}"
|
||||
load: "molecula-consumer-github -i issues -d id --record-type issue --batch-size=100000 --start-time 2020-01-01T00:00:00Z --end-time 2020-01-13T23:00:00Z --cache-dir ~/.githubarchive"
|
||||
|
||||
health_url: "http://localhost:10101/status"
|
||||
vars_urls:
|
||||
- http://localhost:10101/debug/vars
|
||||
- http://localhost:7070/debug/vars
|
||||
11
scripts/etc/gloat/query.count.keyed.yml
Normal file
11
scripts/etc/gloat/query.count.keyed.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
name: "Count() Load Testing w/ Keys"
|
||||
|
||||
main: "pilosa server --data-dir ~/pilosa.query.keyed.${TXSRC} --txsrc ${TXSRC}"
|
||||
load: "pilosa-bench -type count -rate 100 -n 3000"
|
||||
|
||||
health_url: "http://localhost:10101/status"
|
||||
health_regexp: "NORMAL"
|
||||
|
||||
vars_urls:
|
||||
- http://localhost:10101/debug/vars
|
||||
- http://localhost:7070/debug/vars
|
||||
28
scripts/populate_query_db.keyed.sh
Executable file
28
scripts/populate_query_db.keyed.sh
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# This script generates data query load testing to be run against.
|
||||
#
|
||||
# Environment variables:
|
||||
# - TXSRC: Transaction store type ("roaring", "rbf")
|
||||
# - CACHEDIR: Path to local GitHub Archive data, if available.
|
||||
|
||||
# Require environment variables.
|
||||
: "${TXSRC:?Must set TXSRC environment variable}"
|
||||
: "${GHCACHEDIR:''}"
|
||||
|
||||
echo "Starting pilosa"
|
||||
pilosa server --data-dir ~/pilosa.query.keyed.${TXSRC} --txsrc ${TXSRC} & pid_pilosa=$!
|
||||
sleep 5
|
||||
|
||||
echo ""
|
||||
echo "Importing GitHub Archive"
|
||||
molecula-consumer-github -i issues -r url --record-type issue --batch-size=100000 \
|
||||
--start-time 2020-01-01T00:00:00Z --end-time 2020-01-31T23:00:00Z \
|
||||
--cache-dir "$GHCACHEDIR"
|
||||
|
||||
echo ""
|
||||
echo "Import complete, shutting down pilosa"
|
||||
|
||||
sleep 5
|
||||
kill $pid_pilosa
|
||||
Loading…
Add table
Reference in a new issue