resp-benchmark 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: true
5
+ ---
6
+ # resp-benchmark
7
+
8
+ Redis 接口数据库的性能测试套件。
9
+
10
+ ## Overview
11
+
12
+ 1. 使用 Python 编写 cli 界面和 lib 接口;使用 Rust 编写性能测试逻辑;使用 maturin 生态编译。
13
+
14
+ ## Code Style
15
+
16
+ 1. 不需要加太多异常捕获,让代码保持简洁。
17
+
18
+ ## 任务要求
19
+
20
+ 1. 使用 maturin develop 来进行编译安装测试
21
+ 2. 使用 resp-benchmark cli 来进行测试,不要新建文件测试
22
+
23
+
24
+ ## Core Components
25
+
26
+ ### Python Interface
27
+ - [python/resp_benchmark/cli.py](mdc:python/resp_benchmark/cli.py): Command-line interface implementation
28
+
29
+ ### Rust Core
30
+ - [src/lib.rs](mdc:src/lib.rs): Entry point for Rust library, defines Python bindings
@@ -0,0 +1,189 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ linux:
14
+ runs-on: ${{ matrix.platform.runner }}
15
+ strategy:
16
+ matrix:
17
+ platform:
18
+ - runner: ubuntu-latest
19
+ target: x86_64
20
+ - runner: ubuntu-latest
21
+ target: x86
22
+ - runner: ubuntu-latest
23
+ target: aarch64
24
+ - runner: ubuntu-latest
25
+ target: armv7
26
+ - runner: ubuntu-latest
27
+ target: s390x
28
+ - runner: ubuntu-latest
29
+ target: ppc64le
30
+ steps:
31
+ - uses: actions/checkout@v4
32
+ - uses: actions/setup-python@v5
33
+ with:
34
+ python-version: "3.9"
35
+ - name: Setup Rust toolchain
36
+ uses: dtolnay/rust-toolchain@master
37
+ with:
38
+ toolchain: stable
39
+ - name: Cache Rust dependencies
40
+ uses: Swatinem/rust-cache@v2
41
+ with:
42
+ key: ${{ matrix.platform.target }}
43
+ - name: Build wheels
44
+ uses: PyO3/maturin-action@v1
45
+ with:
46
+ target: ${{ matrix.platform.target }}
47
+ args: --release --out dist --find-interpreter
48
+ sccache: 'true'
49
+ manylinux: auto
50
+ - name: Upload wheels
51
+ uses: actions/upload-artifact@v4
52
+ with:
53
+ name: wheels-linux-${{ matrix.platform.target }}
54
+ path: dist
55
+
56
+ musllinux:
57
+ runs-on: ${{ matrix.platform.runner }}
58
+ strategy:
59
+ matrix:
60
+ platform:
61
+ - runner: ubuntu-latest
62
+ target: x86_64
63
+ - runner: ubuntu-latest
64
+ target: x86
65
+ - runner: ubuntu-latest
66
+ target: aarch64
67
+ - runner: ubuntu-latest
68
+ target: armv7
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ - uses: actions/setup-python@v5
72
+ with:
73
+ python-version: "3.9"
74
+ - name: Setup Rust toolchain
75
+ uses: dtolnay/rust-toolchain@master
76
+ with:
77
+ toolchain: stable
78
+ - name: Cache Rust dependencies
79
+ uses: Swatinem/rust-cache@v2
80
+ with:
81
+ key: musllinux-${{ matrix.platform.target }}
82
+ - name: Build wheels
83
+ uses: PyO3/maturin-action@v1
84
+ with:
85
+ target: ${{ matrix.platform.target }}
86
+ args: --release --out dist --find-interpreter
87
+ sccache: 'true'
88
+ manylinux: musllinux_1_2
89
+ - name: Upload wheels
90
+ uses: actions/upload-artifact@v4
91
+ with:
92
+ name: wheels-musllinux-${{ matrix.platform.target }}
93
+ path: dist
94
+
95
+ windows:
96
+ runs-on: ${{ matrix.platform.runner }}
97
+ strategy:
98
+ matrix:
99
+ platform:
100
+ - runner: windows-latest
101
+ target: x64
102
+ - runner: windows-latest
103
+ target: x86
104
+ steps:
105
+ - uses: actions/checkout@v4
106
+ - uses: actions/setup-python@v5
107
+ with:
108
+ python-version: "3.9"
109
+ architecture: ${{ matrix.platform.target }}
110
+ - name: Setup Rust toolchain
111
+ uses: dtolnay/rust-toolchain@master
112
+ with:
113
+ toolchain: stable
114
+ - name: Cache Rust dependencies
115
+ uses: Swatinem/rust-cache@v2
116
+ with:
117
+ key: windows-${{ matrix.platform.target }}
118
+ - name: Build wheels
119
+ uses: PyO3/maturin-action@v1
120
+ with:
121
+ target: ${{ matrix.platform.target }}
122
+ args: --release --out dist --find-interpreter
123
+ sccache: 'true'
124
+ - name: Upload wheels
125
+ uses: actions/upload-artifact@v4
126
+ with:
127
+ name: wheels-windows-${{ matrix.platform.target }}
128
+ path: dist
129
+
130
+ macos:
131
+ runs-on: ${{ matrix.platform.runner }}
132
+ strategy:
133
+ matrix:
134
+ platform:
135
+ - runner: macos-14
136
+ target: aarch64
137
+ steps:
138
+ - uses: actions/checkout@v4
139
+ - uses: actions/setup-python@v5
140
+ with:
141
+ python-version: "3.9"
142
+ - name: Setup Rust toolchain
143
+ uses: dtolnay/rust-toolchain@master
144
+ with:
145
+ toolchain: stable
146
+ - name: Cache Rust dependencies
147
+ uses: Swatinem/rust-cache@v2
148
+ with:
149
+ key: macos-${{ matrix.platform.target }}
150
+ - name: Build wheels
151
+ uses: PyO3/maturin-action@v1
152
+ with:
153
+ target: ${{ matrix.platform.target }}
154
+ args: --release --out dist --find-interpreter
155
+ sccache: 'true'
156
+ - name: Upload wheels
157
+ uses: actions/upload-artifact@v4
158
+ with:
159
+ name: wheels-macos-${{ matrix.platform.target }}
160
+ path: dist
161
+
162
+ sdist:
163
+ runs-on: ubuntu-latest
164
+ steps:
165
+ - uses: actions/checkout@v4
166
+ - name: Build sdist
167
+ uses: PyO3/maturin-action@v1
168
+ with:
169
+ command: sdist
170
+ args: --out dist
171
+ - name: Upload sdist
172
+ uses: actions/upload-artifact@v4
173
+ with:
174
+ name: wheels-sdist
175
+ path: dist
176
+
177
+ release:
178
+ name: Release
179
+ runs-on: ubuntu-latest
180
+ needs: [linux, musllinux, windows, macos, sdist]
181
+ steps:
182
+ - uses: actions/download-artifact@v4
183
+ - name: Publish to PyPI
184
+ uses: PyO3/maturin-action@v1
185
+ env:
186
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
187
+ with:
188
+ command: upload
189
+ args: --non-interactive --skip-existing wheels-*/*
@@ -0,0 +1,72 @@
1
+ /target
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ .pytest_cache/
6
+ *.py[cod]
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ .venv/
14
+ env/
15
+ bin/
16
+ build/
17
+ develop-eggs/
18
+ dist/
19
+ eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ include/
26
+ man/
27
+ venv/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+
32
+ # Installer logs
33
+ pip-log.txt
34
+ pip-delete-this-directory.txt
35
+ pip-selfcheck.json
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .cache
42
+ nosetests.xml
43
+ coverage.xml
44
+
45
+ # Translations
46
+ *.mo
47
+
48
+ # Mr Developer
49
+ .mr.developer.cfg
50
+ .project
51
+ .pydevproject
52
+
53
+ # Rope
54
+ .ropeproject
55
+
56
+ # Django stuff:
57
+ *.log
58
+ *.pot
59
+
60
+ .DS_Store
61
+
62
+ # Sphinx documentation
63
+ docs/_build/
64
+
65
+ # PyCharm
66
+ .idea/
67
+
68
+ # VSCode
69
+ .vscode/
70
+
71
+ # Pyenv
72
+ .python-version