Skip to content

Commit 2e5502c

Browse files
committed
Update slo architecture
1 parent 6db6c3c commit 2e5502c

22 files changed

+913
-894
lines changed

.github/workflows/slo.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,30 @@ jobs:
3333
include:
3434
- prefix: table
3535
workload: sync-table
36+
create-args: grpc://localhost:2135 /Root/testdb
37+
run-args: |
38+
grpc://localhost:2135 /Root/testdb \
39+
--prom-pgw localhost:9091 \
40+
--report-period 250 \
41+
--time ${{inputs.slo_workload_duration_seconds || 600}} \
42+
--read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
43+
--write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
44+
--read-timeout 1000 \
45+
--write-timeout 1000
46+
cleanup-args: grpc://localhost:2135 /Root/testdb
3647
- prefix: table
3748
workload: sync-query
49+
create-args: grpc://localhost:2135 /Root/testdb
50+
run-args: |
51+
grpc://localhost:2135 /Root/testdb \
52+
--prom-pgw localhost:9091 \
53+
--report-period 250 \
54+
--time ${{inputs.slo_workload_duration_seconds || 600}} \
55+
--read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
56+
--write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
57+
--read-timeout 1000 \
58+
--write-timeout 1000
59+
cleanup-args: grpc://localhost:2135 /Root/testdb
3860

3961

4062
concurrency:
@@ -67,26 +89,19 @@ jobs:
6789

6890
- name: Prepare SLO Database
6991
run: |
70-
python ./tests/slo/src ${{ matrix.prefix }}-create grpc://localhost:2135 /Root/testdb
92+
python ./tests/slo/src ${{ matrix.prefix }}-create ${{ matrix.create-args }}
7193
7294
- name: Run SLO Tests
7395
env:
7496
REF: '${{ github.head_ref || github.ref }}'
7597
WORKLOAD: '${{ matrix.workload }}'
7698
run: |
77-
python ./tests/slo/src ${{ matrix.prefix }}-run grpc://localhost:2135 /Root/testdb \
78-
--prom-pgw localhost:9091 \
79-
--report-period 250 \
80-
--time ${{inputs.slo_workload_duration_seconds || 600}} \
81-
--read-rps ${{inputs.slo_workload_read_max_rps || 1000}} \
82-
--write-rps ${{inputs.slo_workload_write_max_rps || 100}} \
83-
--read-timeout 1000 \
84-
--write-timeout 1000
99+
python ./tests/slo/src ${{ matrix.prefix }}-run ${{ matrix.run-args }}
85100
86101
- if: always()
87102
name: Cleanup SLO Database
88103
run: |
89-
python ./tests/slo/src ${{ matrix.prefix }}-cleanup grpc://localhost:2135 /Root/testdb
104+
python ./tests/slo/src ${{ matrix.prefix }}-cleanup ${{ matrix.cleanup-args }}
90105
91106
- if: always()
92107
name: Store ydb chaos testing logs

tests/slo/src/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from options import parse_options
55
from runner import run_from_args
66

7-
logging.basicConfig(level=logging.INFO)
7+
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)-8s %(message)s")
88

99

1010
if __name__ == "__main__":

tests/slo/src/core/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Core utilities

tests/slo/src/core/dummy_metrics.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class DummyMetrics:
2+
def start(self, labels):
3+
return 0
4+
5+
def stop(self, labels, start_time, attempts=1, error=None):
6+
pass
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)