Skip to content

Commit cb41e5d

Browse files
committed
benchmark scenario as bash script
1 parent ee27fe7 commit cb41e5d

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

java/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@ docker
44
docker-compose
55
66
python3
7+
python3-pip
78
89
ghz
910
```
1011

12+
See [docker install guide](https://docs.docker.com/engine/install/ubuntu/),
13+
[docker-compose install guide](https://docs.docker.com/compose/install/) and [ghz install guide](https://ghz.sh/docs/install) to install latest versions.
14+
1115
2. Prepare feature repo
1216
```
17+
pip3 install feast[redis]
18+
1319
cd feature_repo; feast apply
1420
```
1521

1622
3. Start docker compose
1723
```
18-
cd java; docker-compose up
24+
cd java; docker-compose up -d
1925
```
2026
Docker compose will expose too ports:
2127
* 16379 - redis

java/run-benchmark.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
4+
GHZ_FLAGS=${GHZ_FLAGS:-"--insecure -i protos/ --proto ./protos/ServingService.proto --call feast.serving.ServingService.GetOnlineFeaturesV2 --cpus=4 --skipFirst=100"}
5+
6+
TOTAL_REQUESTS_NUM=${TOTAL_REQUESTS_NUM:-10000}
7+
UNIQUE_REQUESTS_NUM=${UNIQUE_REQUESTS_NUM:-1000}
8+
TARGET=${TARGET:-localhost:6566}
9+
10+
11+
single_run() {
12+
echo "Entity rows: $1; Features: $2; Concurrency: $3; RPS: $4"
13+
14+
python3 request_generator.py \
15+
--entity-rows $1 \
16+
--features $2 \
17+
--requests ${UNIQUE_REQUESTS_NUM} \
18+
--output requests-$1-$2.json
19+
20+
ghz ${GHZ_FLAGS}\
21+
-n ${TOTAL_REQUESTS_NUM} \
22+
--data-file requests-$1-$2.json \
23+
--rps $4 \
24+
-c $3 \
25+
$TARGET
26+
}
27+
28+
29+
# single_run <entities> <features> <concurrency> <rps>
30+
31+
32+
CONCURRENCY=${CONCURRENCY:-10}
33+
echo "Freezing concurrency to $CONCURRENCY"
34+
35+
for i in $(seq 100 100 1000); do single_run 1 50 $CONCURRENCY $i; done
36+
37+
for i in $(seq 100 100 1000); do single_run 1 250 $CONCURRENCY $i; done
38+
39+
for i in $(seq 100 100 500); do single_run 100 50 $CONCURRENCY $i; done
40+
41+
for i in $(seq 100 100 500); do single_run 100 250 $CONCURRENCY $i; done
42+
43+
44+
echo "Maximum possible RPS"
45+
46+
for i in $(seq 10 10 50); do single_run 1 50 $i 0; done
47+
48+
for i in $(seq 10 10 50); do single_run 1 250 $i 0; done
49+
50+
for i in $(seq 10 10 50); do single_run 100 50 $i 0; done
51+
52+
for i in $(seq 10 10 50); do single_run 100 250 $i 0; done

0 commit comments

Comments
 (0)