Skip to content

Commit ff61f83

Browse files
authored
Merge pull request #23 from FelixNgFender/main
chore: temporal evals & perf benchmarks
2 parents 89581af + aa5d5b1 commit ff61f83

File tree

150 files changed

+13413
-1382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+13413
-1382
lines changed

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@
6262
"cli",
6363
"client",
6464
"examples",
65+
"evaluations",
66+
"benchmarks",
6567
"others"
6668
]
6769
}

python/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,7 @@ pyrightconfig.json
185185
# benchmark artifacts
186186
benchmarks/payload
187187
benchmarks/results
188+
benchmarks/scenarios/**/payload
189+
190+
# evaluation artifacts
191+
!evaluations/**/*.rrd

python/Dockerfile

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
1-
# TODO: remove
2-
# FROm python:3.12-slim-bookworm
3-
#
4-
# WORKDIR /app
5-
# COPY python_grpc_bench /app
6-
# COPY proto /app/proto
7-
#
8-
# RUN python -m pip install grpcio grpcio-tools
9-
# RUN python -m grpc_tools.protoc -I/app/proto/helloworld --python_out=. --grpc_python_out=. helloworld.proto
10-
#
11-
# ENTRYPOINT [ "python", "/app/server.py" ]
12-
13-
# FROM python:3.12-alpine AS base
141
FROM python:3.12-slim-bookworm AS base
152

163
ENV VIRTUAL_ENV=/app/.venv \
174
PATH="/app/.venv/bin:$PATH"
185

19-
# RUN apk update && \
20-
# apk add libpq
21-
22-
236
FROM base AS builder
247

258
ENV POETRY_NO_INTERACTION=1 \
269
POETRY_VIRTUALENVS_IN_PROJECT=1 \
2710
POETRY_VIRTUALENVS_CREATE=1 \
2811
POETRY_CACHE_DIR=/tmp/poetry_cache
2912

30-
# RUN apk update && \
31-
# apk add musl-dev build-base gcc gfortran openblas-dev
32-
3313
WORKDIR /app
3414

3515
RUN pip install --no-cache-dir poetry==1.8.4
@@ -52,5 +32,4 @@ EXPOSE 8500
5232

5333
ENV PORT=8500
5434

55-
# TODO: Vary entrypoint to include save mode
5635
ENTRYPOINT ["python", "-m", "arflow._cli", "view"]

python/benchmarks/BENCHMARKING.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
# Benchmarking ARFlow
2+
13
Taken from <https://github.com/LesnyRumcajs/grpc_bench>. Instructions to run are
24
in their README.
35

6+
Simple start:
7+
48
```shell
5-
poetry run ./generate_payload.py
9+
./build.sh
10+
11+
./bench.sh
612
```

python/benchmarks/analyze.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ $(git log -1 --pretty="%h %cD %cn %s")
1919
- GRPC_SERVER_RAM=${GRPC_SERVER_RAM}
2020
- GRPC_CLIENT_CONNECTIONS=${GRPC_CLIENT_CONNECTIONS}
2121
- GRPC_CLIENT_CONCURRENCY=${GRPC_CLIENT_CONCURRENCY}
22-
- GRPC_CLIENT_QPS=${GRPC_CLIENT_QPS}
22+
- GRPC_CLIENT_RPS=${GRPC_CLIENT_RPS}
2323
- GRPC_CLIENT_CPUS=${GRPC_CLIENT_CPUS}
24+
- GRPC_CLIENT_FRAMES_PER_REQUEST=${GRPC_CLIENT_FRAMES_PER_REQUEST}
2425
- GRPC_REQUEST_SCENARIO=${GRPC_REQUEST_SCENARIO}
2526
- GRPC_GHZ_TAG=${GRPC_GHZ_TAG}
2627
EOF
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
Summary:
3+
Count: 1199
4+
Total: 60.01 s
5+
Slowest: 51.18 ms
6+
Fastest: 21.35 ms
7+
Average: 31.08 ms
8+
Requests/sec: 19.98
9+
10+
Response time histogram:
11+
21.352 [1] |
12+
24.336 [54] |∎∎∎∎∎
13+
27.319 [144] |∎∎∎∎∎∎∎∎∎∎∎∎∎
14+
30.302 [280] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
15+
33.285 [427] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
16+
36.268 [196] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
17+
39.251 [63] |∎∎∎∎∎∎
18+
42.234 [20] |∎∎
19+
45.217 [12] |∎
20+
48.200 [0] |
21+
51.183 [2] |
22+
23+
Latency distribution:
24+
10 % in 25.61 ms
25+
25 % in 28.83 ms
26+
50 % in 31.02 ms
27+
75 % in 33.23 ms
28+
90 % in 35.79 ms
29+
95 % in 37.62 ms
30+
99 % in 42.88 ms
31+
32+
Status code distribution:
33+
[OK] 1199 responses
34+
35+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
93.57% 333.5MiB / 4GiB
2+
82.20% 328.7MiB / 4GiB
3+
82.58% 302MiB / 4GiB
4+
79.53% 327MiB / 4GiB
5+
79.22% 332.3MiB / 4GiB
6+
78.96% 329.4MiB / 4GiB
7+
82.16% 309.2MiB / 4GiB
8+
79.62% 329.1MiB / 4GiB
9+
77.09% 333.5MiB / 4GiB
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Benchmark Execution Parameters:
2+
a896bbc Sat, 22 Feb 2025 19:16:24 -0500 felixngfender test(server): add color modality to saving AR frames test
3+
- GRPC_BENCHMARK_DURATION=60s
4+
- GRPC_BENCHMARK_WARMUP=10s
5+
- GRPC_SERVER_CPUS=1
6+
- GRPC_SERVER_RAM=4096m
7+
- GRPC_CLIENT_CONNECTIONS=5
8+
- GRPC_CLIENT_CONCURRENCY=5
9+
- GRPC_CLIENT_RPS=20
10+
- GRPC_CLIENT_CPUS=5
11+
- GRPC_CLIENT_FRAMES_PER_REQUEST=15
12+
- GRPC_REQUEST_SCENARIO=heavy
13+
- GRPC_GHZ_TAG=0.114.0
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
Summary:
3+
Count: 10602
4+
Total: 60.00 s
5+
Slowest: 77.30 ms
6+
Fastest: 4.40 ms
7+
Average: 28.08 ms
8+
Requests/sec: 176.70
9+
10+
Response time histogram:
11+
4.396 [1] |
12+
11.687 [1581] |∎∎∎∎∎∎∎∎∎∎∎
13+
18.977 [5870] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
14+
26.267 [149] |∎
15+
33.557 [1] |
16+
40.847 [0] |
17+
48.138 [0] |
18+
55.428 [2] |
19+
62.718 [737] |∎∎∎∎∎
20+
70.008 [2135] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
21+
77.298 [121] |∎
22+
23+
Latency distribution:
24+
10 % in 11.12 ms
25+
25 % in 12.60 ms
26+
50 % in 14.71 ms
27+
75 % in 61.37 ms
28+
90 % in 65.74 ms
29+
95 % in 67.43 ms
30+
99 % in 70.23 ms
31+
32+
Status code distribution:
33+
[Unavailable] 5 responses
34+
[OK] 10597 responses
35+
36+
Error distribution:
37+
[1] rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:58822->127.0.0.1:50051: use of closed network connection
38+
[1] rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:58838->127.0.0.1:50051: use of closed network connection
39+
[1] rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:58830->127.0.0.1:50051: use of closed network connection
40+
[1] rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:58808->127.0.0.1:50051: use of closed network connection
41+
[1] rpc error: code = Unavailable desc = error reading from server: read tcp 127.0.0.1:58814->127.0.0.1:50051: use of closed network connection
42+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
104.69% 104.4MiB / 4GiB
2+
103.08% 105.9MiB / 4GiB
3+
102.06% 103.5MiB / 4GiB
4+
102.64% 103.7MiB / 4GiB
5+
102.48% 100.8MiB / 4GiB
6+
101.71% 107MiB / 4GiB
7+
101.63% 102.9MiB / 4GiB
8+
104.59% 101.4MiB / 4GiB
9+
103.40% 105.4MiB / 4GiB

0 commit comments

Comments
 (0)