Skip to content
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
61 changes: 61 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ commands:
- run:
name: Build release
command: bash -l -c "make build pack <<parameters.build_params>>"
- save_cache:
key: v2-dependencies-{{ arch }}-{{ checksum "Cargo.lock" }}
paths:
- "~/.cargo"
- "./target"

test-steps:
steps:
- abort-for-docs
- checkout-all
- run:
name: Run all tests
command: bash -l -c "make pytest"
Expand Down Expand Up @@ -143,12 +153,51 @@ commands:
make publish OSNICK=<<parameters.platform>> VERSION=$CIRCLE_TAG BRANCH=$CIRCLE_BRANCH OFFICIAL=0 SHOW=1 VERBOSE=1
- persist-artifacts

benchmark-steps:
parameters:
github_actor:
type: string
default: $CIRCLE_USERNAME
module_path:
type: string
default: ../../target/release/rejson.so
steps:
- run:
name: Install remote benchmark tool dependencies
command: |
mkdir -p /workspace
TF_EXE_FILE_NAME=/workspace/terraform ./tests/benchmarks/remote/install_deps.sh
- run:
name: Install remote benchmark python dependencies
command: python3 -m pip install -r ./tests/benchmarks/requirements.txt
- run:
name: Run CI benchmarks on aws
command: |
cd ./tests/benchmarks
export AWS_ACCESS_KEY_ID=$PERFORMANCE_EC2_ACCESS_KEY
export AWS_SECRET_ACCESS_KEY=$PERFORMANCE_EC2_SECRET_KEY
export AWS_DEFAULT_REGION=$PERFORMANCE_EC2_REGION
export EC2_PRIVATE_PEM=$PERFORMANCE_EC2_PRIVATE_PEM

redisbench-admin run-remote \
--terraform_bin_path /workspace/terraform \
--module_path << parameters.module_path >> \
--github_actor << parameters.github_actor >> \
--github_repo $CIRCLE_PROJECT_REPONAME \
--github_org $CIRCLE_PROJECT_USERNAME \
--github_sha $CIRCLE_SHA1 \
--github_branch $CIRCLE_BRANCH \
--upload_results_s3 \
--triggering_env circleci \
--push_results_redistimeseries

jobs:
build:
docker:
- image: redisfab/rmbuilder:6.2.1-x64-buster
steps:
- build-steps
- test-steps

platforms-build:
parameters:
Expand All @@ -165,6 +214,7 @@ jobs:
xcode: 11.3.0
steps:
- build-steps
- test-steps

deploy-artifacts:
parameters:
Expand Down Expand Up @@ -212,6 +262,12 @@ jobs:
name: Run QA Automation
command: MODULE_VERSION=$CIRCLE_BRANCH VERBOSE=1 TEST=nightly QUICK=1 ./tests/qa/run

performance-automation:
docker:
- image: redisfab/rmbuilder:6.2.1-x64-bionic
steps:
- build-steps
- benchmark-steps

on-any-branch: &on-any-branch
filters:
Expand Down Expand Up @@ -303,6 +359,9 @@ workflows:
<<: *on-version-tags
requires:
- deploy_release
- performance-automation:
<<: *not-on-integ-branch
context: common

nightly:
triggers:
Expand All @@ -315,3 +374,5 @@ workflows:
- /^feature-.*$/
jobs:
- nightly-automation
- performance-automation:
context: common
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,25 @@ cargo_test:

#----------------------------------------------------------------------------------------------

BENCHMARK_ARGS = redisbench-admin run-local

ifneq ($(REMOTE),)
BENCHMARK_ARGS = redisbench-admin run-remote
endif

BENCHMARK_ARGS += --module_path $(realpath $(TARGET))
ifneq ($(BENCHMARK),)
BENCHMARK_ARGS += --test $(BENCHMARK)
endif


benchmark: $(TARGET)
cd ./tests/benchmarks; $(BENCHMARK_ARGS) ; cd ../../

.PHONY: benchmark

#----------------------------------------------------------------------------------------------

pack:
./sbin/pack.sh

Expand Down
6 changes: 6 additions & 0 deletions tests/benchmarks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.json
*.txt
*.csv
datasets/*.rdb
*.rdb
binaries
15 changes: 15 additions & 0 deletions tests/benchmarks/defaults.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 0.2
exporter:
redistimeseries:
break_by:
- version
- commit
timemetric: "$.StartTime"
metrics:
- "$.Tests.Overall.rps"
- "$.Tests.Overall.avg_latency_ms"
- "$.Tests.Overall.p50_latency_ms"
- "$.Tests.Overall.p95_latency_ms"
- "$.Tests.Overall.p99_latency_ms"
- "$.Tests.Overall.max_latency_ms"
- "$.Tests.Overall.min_latency_ms"
17 changes: 17 additions & 0 deletions tests/benchmarks/json_arrappend_geojson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_arrappend_geojson"
description: "JSON.ARRAPPEND path:sonde:foo .properties.coordinateProperties || https://github.com/RedisJSON/RedisJSON/issues/295"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/redisjson-gh295-dump.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 10000
- threads: 2
- pipeline: 1
- command: 'JSON.ARRAPPEND path:sonde:foo .properties.coordinateProperties "{\"type\": \"Feature\", \"geometry\": {\"type\": \"Point\", \"coordinates\": [26.2153, 60.34085, 417.0]}, \"properties\": {\"temp\": 3.6, \"serial\": \"S0730589\", \"humidity\": 64.6, \"vel_h\": 16.0, \"uploader_callsign\": \"Lahti 24h raspberry\", \"time\": 1617220020, \"uploader\": {\"callsign\": \"Lahti 24h raspberry\"}}}"'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_set_ResultSet.totalResultsAvailable_1_jsonsl-yahoo2_json"
description: "JSON.GET jsonsl-yahoo2 ResultSet.totalResultsAvailable || https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET jsonsl-yahoo2 ResultSet.totalResultsAvailable'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_[0]_jsonsl-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[0]_jsonsl-1"
description: "JSON.GET jsonsl-1 [0] || {jsonsl-1.json size: 1.4 KB} https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET jsonsl-1 [0]'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_[7]_jsonsl-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[7]_jsonsl-1"
description: "JSON.GET jsonsl-1 [7] || {jsonsl-1.json size: 1.4 KB} https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET jsonsl-1 [7]'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_[8].zero_jsonsl-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[8].zero_jsonsl-1"
description: "JSON.GET jsonsl-1 [8].0 || {jsonsl-1.json size: 1.4 KB} https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET jsonsl-1 [8].zero'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[web-app].servlet[0][servlet-name]_json-parser-0000"
description: "JSON.GET json-parser-0000 [web-app].servlet[0][servlet-name] {json-parser-0000.json size: 3.5K} || https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET json-parser-0000 ["\"web-app\""].servlet[0]["\"servlet-name\""]'
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[web-app].servlet[0]_json-parser-0000"
description: "JSON.GET json-parser-0000 [web-app].servlet[0] {json-parser-0000.json size: 3.5K} || https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET json-parser-0000 ["\"web-app\""].servlet[0]'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_[web-app].servlet_json-parser-0000.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_[web-app].servlet_json-parser-0000"
description: "JSON.GET json-parser-0000 [web-app].servlet {json-parser-0000.json size: 3.5K} || https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET json-parser-0000 ["\"web-app\""].servlet'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_array_of_docs[1]_pass_100_json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_array_of_docs[1]_pass_100_json"
description: "JSON.GET pass-100 array_of_docs[1] || {Full document: pass-100.json https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET pass-100 array_of_docs[1]'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_array_of_docs[1]sclr_pass_100_json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_array_of_docs[1]_pass_100_json"
description: "JSON.GET pass-100 array_of_docs[1] || {Full document: pass-100.json https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET pass-100 array_of_docs[1].sclr'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_array_of_docs_pass_100_json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_array_of_docs_pass_100_json"
description: "JSON.GET pass-100 array_of_docs || {Full document: pass-100.json https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET pass-100 array_of_docs'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_fulldoc_json-parser-0000.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_fulldoc_json-parser-0000"
description: "JSON.GET json-parser-0000 . {json-parser-0000.json size: 3.5K} || https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET json-parser-0000 .'
17 changes: 17 additions & 0 deletions tests/benchmarks/json_get_fulldoc_jsonsl-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 0.2
name: "json_get_fulldoc_jsonsl-1"
description: "JSON.GET jsonsl-1 . || {jsonsl-1.json size: 1.4 KB} https://oss.redislabs.com/redisjson/performance/"
remote:
- type: oss-standalone
- setup: redisearch-m5d
dbconfig:
- dataset: "https://s3.amazonaws.com/benchmarks.redislabs/redisjson/performance.docs/performance.docs.rdb"
clientconfig:
- tool: redis-benchmark
- min-tool-version: "6.2.0"
- parameters:
- clients: 16
- requests: 1000000
- threads: 2
- pipeline: 1
- command: 'JSON.GET jsonsl-1 .'
Loading