Skip to content

Commit ebea927

Browse files
Moved common benchmark automation code to redisbench-admin package. Improved benchmark specification file (#1597)
1 parent acde693 commit ebea927

File tree

6 files changed

+55
-598
lines changed

6 files changed

+55
-598
lines changed

.circleci/config.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ commands:
8686
github_actor:
8787
type: string
8888
default: $CIRCLE_USERNAME
89+
module_path:
90+
type: string
91+
default: /workspace/$MODULE_ARTIFACT
8992
steps:
9093
- run:
9194
name: Install remote benchmark tool dependencies
@@ -102,9 +105,9 @@ commands:
102105
export AWS_DEFAULT_REGION=$PERFORMANCE_EC2_REGION
103106
export EC2_PRIVATE_PEM=$PERFORMANCE_EC2_PRIVATE_PEM
104107
105-
python3 remote-runner.py \
108+
redisbench-admin run-remote \
106109
--terraform_bin_path /workspace/terraform \
107-
--module_path /workspace/$MODULE_ARTIFACT \
110+
--module_path << parameters.module_path >> \
108111
--github_actor << parameters.github_actor >> \
109112
--github_repo $CIRCLE_PROJECT_REPONAME \
110113
--github_org $CIRCLE_PROJECT_USERNAME \
@@ -168,6 +171,18 @@ jobs:
168171
name: Test
169172
command: make test
170173

174+
- run:
175+
name: Persist Artifact for CI benchmarks
176+
command: |
177+
strip src/$MODULE_ARTIFACT
178+
mkdir -p /workspace
179+
cp src/$MODULE_ARTIFACT /workspace
180+
181+
- persist_to_workspace:
182+
root: /workspace
183+
paths:
184+
- '*.so'
185+
171186
build_memcheck:
172187
docker:
173188
- image: redisfab/rmbuilder:6.0.9-x64-bionic
@@ -275,6 +290,16 @@ jobs:
275290
name: Run QA Automation
276291
command: MODULE_VERSION=$CIRCLE_BRANCH VERBOSE=1 TEST=nightly QUICK=1 ./tests/qa/run
277292

293+
performance_ci_automation_not_integ:
294+
docker:
295+
- image: 'redisfab/rmbuilder:6.0.9-x64-bionic'
296+
steps:
297+
- early_return_for_forked_pull_requests
298+
- checkout
299+
- attach_workspace:
300+
at: /workspace
301+
- benchmark-automation
302+
278303
performance_ci_automation:
279304
docker:
280305
- image: redisfab/rmbuilder:6.0.9-x64-bionic
@@ -283,6 +308,10 @@ jobs:
283308
- checkout
284309
- attach_workspace:
285310
at: /workspace
311+
- run:
312+
name: Unzip module artifact
313+
command: unzip /workspace/$PACKAGE_NAME.Linux-ubuntu18.04-x86_64.*.zip -d /workspace/
314+
286315
- benchmark-automation
287316

288317
nightly_performance_automation:
@@ -302,6 +331,7 @@ jobs:
302331

303332
- benchmark-automation:
304333
github_actor: "ci.nightly"
334+
module_path: "/root/project/src/$PACKAGE_NAME.so"
305335

306336

307337
on-any-branch: &on-any-branch
@@ -389,8 +419,11 @@ workflows:
389419
requires:
390420
- platform_build
391421
- build_macos
422+
- performance_ci_automation_not_integ:
423+
<<: *not-on-integ-branch
424+
requires:
425+
- build
392426
- performance_ci_automation:
393-
<<: *on-integ-branch
394427
requires:
395428
- platform_build
396429

tests/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ ifneq ($(V),)
1010
TEST_ARGS += --verbose
1111
endif
1212

13+
ifneq ($(REMOTE),)
14+
BENCHMARK_ARGS = redisbench-admin run-remote
15+
else
16+
BENCHMARK_ARGS = redisbench-admin run-local
17+
endif
18+
19+
BENCHMARK_ARGS += --module_path $(shell pwd)/../src/redisgraph.so
1320
ifneq ($(BENCHMARK),)
1421
BENCHMARK_ARGS += --test $(BENCHMARK)
1522
endif
@@ -48,7 +55,7 @@ memcheck:
4855
./memcheck.sh
4956

5057
benchmark:
51-
cd benchmarks; python3 local-runner.py $(BENCHMARK_ARGS) ; cd ..
58+
cd benchmarks; $(BENCHMARK_ARGS) ; cd ..
5259

5360
clean:
5461
@find . -name '*.[oad]' -type f -delete

tests/benchmarks/local-runner.py

Lines changed: 0 additions & 140 deletions
This file was deleted.

0 commit comments

Comments
 (0)