Skip to content

Commit f0ef2bd

Browse files
authored
Merge branch 'master' into patch-1
2 parents 32f936e + d4ba815 commit f0ef2bd

19 files changed

+339
-181
lines changed

.circleci/config.yml

Lines changed: 3 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ parameters:
44
run_default_flow:
55
default: true
66
type: boolean
7-
run_benchmark_flow_label:
8-
default: false
9-
type: boolean
107

118
commands:
129
early-returns:
@@ -268,70 +265,6 @@ commands:
268265
make publish OSNICK=<<parameters.platform>> VERSION=$CIRCLE_TAG BRANCH=$CIRCLE_BRANCH OFFICIAL=1 SHOW=1
269266
- persist-artifacts
270267

271-
benchmark-steps:
272-
parameters:
273-
github_actor:
274-
type: string
275-
default: $CIRCLE_USERNAME
276-
module_path:
277-
type: string
278-
default: bin/linux-x64-release/rejson.so
279-
profile_env:
280-
type: string
281-
default: "0"
282-
benchmark_glob:
283-
type: string
284-
default: "*.yml"
285-
triggering_env:
286-
type: string
287-
default: "circleci"
288-
allowed_envs:
289-
type: string
290-
default: "oss-standalone"
291-
steps:
292-
- run:
293-
name: Prepare automation
294-
command: |
295-
./deps/readies/bin/getpy3
296-
python3 -m pip install -r tests/benchmarks/requirements.txt
297-
VERSION=0.14.8 ./deps/readies/bin/getterraform
298-
- run:
299-
name: Run CI benchmarks on aws
300-
timeout: 60m
301-
no_output_timeout: 30m
302-
command: |
303-
ROOT="$PWD"
304-
cd tests/benchmarks
305-
export AWS_ACCESS_KEY_ID=$PERFORMANCE_EC2_ACCESS_KEY
306-
export AWS_SECRET_ACCESS_KEY=$PERFORMANCE_EC2_SECRET_KEY
307-
export AWS_DEFAULT_REGION=$PERFORMANCE_EC2_REGION
308-
export EC2_PRIVATE_PEM=$PERFORMANCE_EC2_PRIVATE_PEM
309-
export PROFILE=<< parameters.profile_env >>
310-
export BENCHMARK_GLOB=<< parameters.benchmark_glob >>
311-
export PERF_CALLGRAPH_MODE="dwarf"
312-
redisbench-admin run-remote \
313-
--required-module ReJSON \
314-
--module_path "$ROOT/<< parameters.module_path >>" \
315-
--github_actor "<< parameters.github_actor >>" \
316-
--github_repo $CIRCLE_PROJECT_REPONAME \
317-
--github_org $CIRCLE_PROJECT_USERNAME \
318-
--github_sha $CIRCLE_SHA1 \
319-
--github_branch $CIRCLE_BRANCH \
320-
--upload_results_s3 \
321-
--fail_fast \
322-
--triggering_env << parameters.triggering_env >> \
323-
--push_results_redistimeseries \
324-
--allowed-envs << parameters.allowed_envs >> || true
325-
- run:
326-
name: Generate Pull Request Performance info
327-
command: |
328-
if [[ -n ${CIRCLE_PULL_REQUEST##*/} ]]; then
329-
redisbench-admin compare \
330-
--defaults_filename ./tests/benchmarks/defaults.yml \
331-
--comparison-branch $CIRCLE_BRANCH \
332-
--auto-approve \
333-
--pull-request ${CIRCLE_PULL_REQUEST##*/}
334-
fi
335268
#----------------------------------------------------------------------------------------------------------------------------------
336269

337270
jobs:
@@ -384,7 +317,7 @@ jobs:
384317

385318
build-macos-x64:
386319
macos:
387-
xcode: 12.5.1
320+
xcode: 13.4.1
388321
resource_class: macos.x86.medium.gen2
389322
parameters:
390323
upload:
@@ -492,22 +425,6 @@ jobs:
492425
name: Run QA Automation
493426
command: ./tests/qa/qatests -m "$CIRCLE_TAG"
494427

495-
benchmark-json-oss-standalone:
496-
docker:
497-
- image: redisfab/rmbuilder:6.2.7-x64-focal
498-
steps:
499-
- build-steps
500-
- benchmark-steps
501-
502-
benchmark-json-oss-standalone-profiler:
503-
docker:
504-
- image: redisfab/rmbuilder:6.2.7-x64-focal
505-
steps:
506-
- build-steps
507-
- benchmark-steps:
508-
profile_env: "1"
509-
triggering_env: "circleci.profilers" # results generated with profilers attached are not mixed with the ones without it
510-
511428
#----------------------------------------------------------------------------------------------------------------------------------
512429

513430
on-any-branch: &on-any-branch
@@ -599,7 +516,7 @@ workflows:
599516
context: common
600517
matrix:
601518
parameters:
602-
platform: [jammy, focal, bionic, centos7, rocky8, bullseye, amzn2]
519+
platform: [jammy, focal, bionic, centos7, rocky8, rocky9, bullseye, amzn2]
603520
- build-arm-platforms:
604521
<<: *on-integ-and-version-tags
605522
context: common
@@ -644,23 +561,7 @@ workflows:
644561
context: common
645562
requires:
646563
- upload-release-artifacts
647-
- benchmark-json-oss-standalone:
648-
<<: *on-integ-and-version-tags
649-
context: common
650-
- benchmark-json-oss-standalone-profiler:
651-
<<: *on-integ-and-version-tags
652-
context: common
653564

654-
benchmark_flow_label:
655-
when:
656-
<< pipeline.parameters.run_benchmark_flow_label >>
657-
jobs:
658-
- benchmark-json-oss-standalone:
659-
<<: *on-any-branch
660-
context: common
661-
- benchmark-json-oss-standalone-profiler:
662-
<<: *on-any-branch
663-
context: common
664565

665566
nightly:
666567
triggers:
@@ -672,21 +573,7 @@ workflows:
672573
name: build-with-redis-<<matrix.redis_version>>
673574
matrix:
674575
parameters:
675-
redis_version: ["7", "unstable"]
676-
677-
nightly-perf-once-a-week:
678-
triggers:
679-
- schedule:
680-
# “At 07:00 on Mondays.”
681-
cron: "00 07 * * 1"
682-
filters:
683-
branches:
684-
only: master
685-
jobs:
686-
- benchmark-json-oss-standalone:
687-
context: common
688-
- benchmark-json-oss-standalone-profiler:
689-
context: common
576+
redis_version: ["7", "unstable"]
690577

691578
nightly-twice-a-week:
692579
triggers:

.github/workflows/benchmark-flow.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Run a Benchmark Flow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
container:
7+
type: string
8+
default: redisfab/rmbuilder:6.2.7-x64-focal
9+
module_path:
10+
type: string
11+
default: bin/linux-x64-release/rejson.so
12+
profile_env:
13+
type: number # for default of 0
14+
cluster_env:
15+
type: string # for default of ""
16+
benchmark_glob:
17+
type: string
18+
default: "*.yml"
19+
triggering_env:
20+
type: string
21+
default: "circleci" # TODO: change to "github-actions" when ready on grafana
22+
allowed_envs:
23+
type: string
24+
default: "oss-standalone"
25+
allowed_setups:
26+
type: string
27+
benchmark_runner_group_member_id:
28+
type: number
29+
default: 1
30+
benchmark_runner_group_total:
31+
type: number
32+
default: 1
33+
34+
jobs:
35+
benchmark-steps:
36+
runs-on: ubuntu-latest
37+
container: ${{ inputs.container }}
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
- run: |
42+
git init
43+
git config --global --add safe.directory '*'
44+
git submodule update --init --recursive
45+
46+
- name: System setup
47+
run: ./sbin/system-setup.py
48+
49+
- name: Get Redis
50+
uses: actions/checkout@v4
51+
with:
52+
repository: redis/redis
53+
ref: '7.2'
54+
path: redis
55+
56+
- name: Build Redis
57+
working-directory: redis
58+
run: make install
59+
60+
- name: Build RedisJSON
61+
run: |
62+
. $HOME/.cargo/env
63+
make build
64+
65+
- name: Prepare automation
66+
run: |
67+
./deps/readies/bin/getpy3
68+
python3 -m pip install -r tests/benchmarks/requirements.txt
69+
VERSION=0.14.8 ./deps/readies/bin/getterraform
70+
71+
- name: Run CI benchmarks on aws for envs ${{ inputs.allowed_envs }}
72+
timeout-minutes: 240 # timeout for the step
73+
working-directory: tests/benchmarks
74+
continue-on-error: true
75+
env:
76+
# Hard-coded
77+
PERF_CALLGRAPH_MODE: dwarf
78+
MAX_PROFILERS: 1
79+
# Secrets
80+
AWS_ACCESS_KEY_ID: ${{ secrets.PERFORMANCE_EC2_ACCESS_KEY }}
81+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PERFORMANCE_EC2_SECRET_KEY }}
82+
AWS_DEFAULT_REGION: ${{ secrets.PERFORMANCE_EC2_REGION }}
83+
EC2_PRIVATE_PEM: ${{ secrets.PERFORMANCE_EC2_PRIVATE_PEM }}
84+
# Inputs
85+
PROFILE: ${{ inputs.profile_env }}
86+
BENCHMARK_GLOB: ${{ inputs.benchmark_glob }}
87+
BENCHMARK_RUNNER_GROUP_M_ID: ${{ inputs.benchmark_runner_group_member_id }}
88+
BENCHMARK_RUNNER_GROUP_TOTAL: ${{ inputs.benchmark_runner_group_total }}
89+
run: redisbench-admin run-remote
90+
--module_path ../../${{ inputs.module_path }}
91+
--github_actor ${{ github.triggering_actor }}
92+
--github_repo ${{ github.event.repository.name }}
93+
--github_org ${{ github.repository_owner }}
94+
--required-module ReJSON
95+
--github_sha ${{ github.sha }}
96+
--github_branch ${{ github.head_ref || github.ref_name }}
97+
--upload_results_s3
98+
--triggering_env ${{ inputs.triggering_env }}
99+
--allowed-envs ${{ inputs.allowed_envs }}
100+
--allowed-setups ${{ inputs.allowed_setups }}
101+
--push_results_redistimeseries
102+
--redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }}
103+
--redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }}
104+
--redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}'
105+
106+
- name: Generate Pull Request Performance info
107+
if: github.event.number
108+
env:
109+
PERFORMANCE_GH_TOKEN: ${{ secrets.PERFORMANCE_GH_TOKEN }}
110+
PERFORMANCE_WH_TOKEN: ${{ secrets.PERFORMANCE_WH_TOKEN }}
111+
run: redisbench-admin compare
112+
--defaults_filename ./tests/benchmarks/defaults.yml
113+
--comparison-branch ${{ github.head_ref || github.ref_name }}
114+
--auto-approve
115+
--pull-request ${{ github.event.number }}
116+
--redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }}
117+
--redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }}
118+
--redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}'
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Run RedisJSON Benchmarks
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
extended:
7+
type: boolean
8+
description: 'Run extended benchmarks'
9+
default: false
10+
workflow_call:
11+
inputs:
12+
extended:
13+
type: boolean
14+
default: false
15+
16+
jobs:
17+
benchmark-json-oss-standalone:
18+
strategy:
19+
matrix:
20+
member_id: [1, 2, 3]
21+
uses: ./.github/workflows/benchmark-flow.yml
22+
secrets: inherit
23+
with:
24+
benchmark_runner_group_member_id: ${{ matrix.member_id }}
25+
benchmark_runner_group_total: ${{ strategy.job-total }}
26+
27+
benchmark-json-oss-standalone-profiler:
28+
strategy:
29+
matrix:
30+
member_id: [1, 2, 3]
31+
uses: ./.github/workflows/benchmark-flow.yml
32+
secrets: inherit
33+
with:
34+
profile_env: 1
35+
# TODO: change to "github-actions.profilers" when ready on grafana
36+
triggering_env: "circleci.profilers" # results generated with profilers attached are not mixed with the ones without it
37+
benchmark_runner_group_member_id: ${{ matrix.member_id }}
38+
benchmark_runner_group_total: ${{ strategy.job-total }}
39+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Check if needs trigger CircleCI benchmark
2+
3+
on:
4+
pull_request:
5+
types: [opened, labeled, unlabeled, synchronize]
6+
7+
jobs:
8+
haslabel:
9+
name: analyse labels
10+
runs-on: ubuntu-latest
11+
outputs:
12+
benchmark: ${{ steps.haslabel.outputs.labeled-run-benchmark }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Check if labeled with run-benchmark
16+
id: haslabel
17+
uses: DanielTamkin/HasLabel@v1.0.4
18+
with:
19+
contains: 'run-benchmark'
20+
21+
perf-ci:
22+
name: Trigger
23+
needs: haslabel
24+
if: needs.haslabel.outputs.benchmark
25+
uses: ./.github/workflows/benchmark-runner.yml
26+
secrets: inherit
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Push to Version, Feature or Master Branch
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'feature-*'
8+
- '[0-9]+.[0-9]+'
9+
10+
jobs:
11+
benchmark:
12+
uses: ./.github/workflows/benchmark-runner.yml
13+
secrets: inherit

.github/workflows/event-weekly.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Weekly Flow
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * 0"
6+
7+
jobs:
8+
run-benchmarks:
9+
uses: ./.github/workflows/benchmark-runner.yml
10+
secrets: inherit
11+
with:
12+
extended: true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy