Skip to content

Commit 31f00e4

Browse files
committed
v1.1.0 开发
1 parent 1805a89 commit 31f00e4

File tree

143 files changed

+11491
-363
lines changed

Some content is hidden

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

143 files changed

+11491
-363
lines changed

.gitee/ISSUE_TEMPLATE/bug.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Bug 反馈
2+
description: 如果你在使用 Redisun 过程中发现了 Bug,请使用此模板进行反馈。
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: input
7+
id: version
8+
attributes:
9+
label: Redisun 版本
10+
description: 请输入你正在使用的 Redisun 版本号
11+
placeholder: 例如:1.0.0
12+
validations:
13+
required: true
14+
- type: dropdown
15+
id: jdk_version
16+
attributes:
17+
label: JDK 版本
18+
description: 请选择项目使用的 Java 版本?
19+
options:
20+
- JDK 1.8
21+
- JDK 11
22+
- JDK 17
23+
- JDK 18
24+
- JDK 19
25+
- JDK 20
26+
- JDK 21
27+
- JDK 22
28+
- JDK 23
29+
validations:
30+
required: true
31+
- type: textarea
32+
id: environment
33+
attributes:
34+
label: 运行环境
35+
description: 请描述相关的运行环境信息(操作系统、Redis版本等)
36+
placeholder: |
37+
- 操作系统: [例如 Windows 10, macOS 12.0, Ubuntu 20.04]
38+
- Redis 版本: [例如 Redis 6.2.6]
39+
- 其他相关信息:
40+
- type: checkboxes
41+
attributes:
42+
label: 是否已搜索过类似问题?
43+
options:
44+
- label: 我已经搜索过现有的问题 (https://gitee.com/smartboot/redisun/issues)
45+
required: true
46+
- type: textarea
47+
attributes:
48+
label: 复现步骤
49+
description: 请详细告诉我们如何复现你遇到的问题,如涉及代码,可提供一个最小代码示例,并使用反引号```附上它
50+
placeholder: |
51+
1. ...
52+
2. ...
53+
3. ...
54+
validations:
55+
required: true
56+
- type: textarea
57+
attributes:
58+
label: 预期结果
59+
description: 请告诉我们你预期会发生什么。
60+
validations:
61+
required: true
62+
- type: textarea
63+
attributes:
64+
label: 实际结果
65+
description: 请告诉我们实际发生了什么。
66+
validations:
67+
required: true
68+
- type: textarea
69+
attributes:
70+
label: 异常堆栈
71+
description: 如果有异常请把详细异常堆栈粘贴上来。
72+
placeholder: |
73+
```java
74+
// 在此处粘贴异常堆栈信息
75+
```
76+
- type: textarea
77+
attributes:
78+
label: 截图或视频
79+
description: 如果可以的话,上传任何关于 bug 的截图。
80+
placeholder: |
81+
可在此处进行图片粘贴上传。

.gitee/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
blank_issues_enabled: true
2+
3+
contact_links:
4+
- name: 📚使用文档
5+
url: https://smartboot.tech/redisun/
6+
about: Redisun in Action,常读常新
7+

.gitee/ISSUE_TEMPLATE/feature.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: 功能建议
2+
description: 如果您希望 Redisun 添加新功能或改进现有功能,请使用此模板进行反馈。
3+
title: '[feature]: '
4+
labels: ['feature']
5+
body:
6+
- type: textarea
7+
id: problem-description
8+
attributes:
9+
label: 您遇到的问题是什么?
10+
description: 请简要描述您在使用 Redisun 过程中遇到的问题或不便之处
11+
placeholder: |
12+
示例:
13+
当我在使用...时,发现...
14+
validations:
15+
required: true
16+
17+
- type: textarea
18+
id: solution-description
19+
attributes:
20+
label: 您希望看到什么解决方案?
21+
description: 请清楚地描述您想要的功能或改进建议
22+
placeholder: |
23+
示例:
24+
我希望能够添加...功能,这样就可以...
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: alternative-solutions
30+
attributes:
31+
label: 您考虑过哪些替代方案?
32+
description: 请描述您考虑过的其他解决方案或功能
33+
placeholder: |
34+
示例:
35+
我尝试过使用...但发现...
36+
37+
- type: textarea
38+
id: additional-context
39+
attributes:
40+
label: 其他上下文信息
41+
description: 在此处添加有关功能请求的任何其他上下文或截图
42+
placeholder: |
43+
可在此处粘贴相关截图或其他信息
44+
45+
- type: checkboxes
46+
id: checklist
47+
attributes:
48+
label: 检查清单
49+
options:
50+
- label: 我已经搜索了现有的 ISSUE,确认这个功能还没有被提过
51+
required: true
52+
- label: 我相信这个功能对大多数 Redisun 用户都有用
53+
required: true
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: 案例登记
2+
description: |
3+
如果你是 redisun 的使用者,欢迎在此登记你的使用案例,包括公司名称和 logo 等信息。
4+
5+
**注意:所有提交的 ISSUE 标题必须以【案例登记】开头,例如:【案例登记】某某公司使用案例。**
6+
title: "【案例登记】"
7+
labels: ["case-study"]
8+
body:
9+
- type: input
10+
id: company_name
11+
attributes:
12+
label: 公司名称
13+
description: 请输入您的公司名称
14+
placeholder: 例如:某某科技有限公司
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: company_logo
19+
attributes:
20+
label: 公司 Logo
21+
description: 请上传您的公司 Logo(可拖拽图片到文本框或粘贴图片URL)
22+
placeholder: |
23+
可直接粘贴图片,或输入图片URL
24+
validations:
25+
required: true
26+
- type: dropdown
27+
id: industry
28+
attributes:
29+
label: 所属行业
30+
description: 请选择您的公司所属行业
31+
options:
32+
- 互联网
33+
- 金融
34+
- 教育
35+
- 医疗
36+
- 电商
37+
- 游戏
38+
- 政府/事业单位
39+
- 其他
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: usage_scenario
44+
attributes:
45+
label: 使用场景
46+
description: 请描述 redisun 在贵公司的具体使用场景
47+
placeholder: |
48+
例如:
49+
1. 用于缓存用户会话信息
50+
2. 作为消息队列使用
51+
3. 存储实时统计数据
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: benefits
56+
attributes:
57+
label: 获得收益
58+
description: 使用 redisun 后给业务带来的收益或改进
59+
placeholder: |
60+
例如:
61+
1. 性能提升 XX%
62+
2. 开发效率提高
63+
3. 成本降低 XX%
64+
- type: textarea
65+
id: project_links
66+
attributes:
67+
label: 项目链接
68+
description: 如果有公开的项目链接,请提供
69+
placeholder: |
70+
可提供项目官网、GitHub/Gitee地址等
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/benchmark.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: 性能测试
2+
3+
on:
4+
# 允许手动触发
5+
workflow_dispatch:
6+
# 在推送代码到主分支时触发
7+
push:
8+
branches: [ master ]
9+
# 在创建 pull request 时触发
10+
pull_request:
11+
branches: [ master ]
12+
13+
jobs:
14+
benchmark:
15+
runs-on: ubuntu-latest
16+
17+
services:
18+
# 启动 Redis 服务
19+
redis:
20+
image: redis:latest
21+
ports:
22+
- 6379:6379
23+
options: >-
24+
--health-cmd "redis-cli ping"
25+
--health-interval 10s
26+
--health-timeout 5s
27+
--health-retries 5
28+
29+
steps:
30+
# 检出代码
31+
- name: 检出代码
32+
uses: actions/checkout@v4
33+
34+
# 设置 Java 环境
35+
- name: 设置 Java 环境
36+
uses: actions/setup-java@v4
37+
with:
38+
java-version: '8'
39+
distribution: 'temurin'
40+
cache: 'maven'
41+
42+
# 编译项目
43+
- name: 编译项目
44+
run: mvn compile
45+
46+
# 运行 Redisun、Redisson、Jedis 和 Lettuce 性能测试
47+
- name: 运行性能测试
48+
run: |
49+
# 串行执行所有客户端数量的测试
50+
for client_count in 1 8 16 64 128 1024 2048; do
51+
echo "Running Redisun vs Redisson vs Jedis vs Lettuce benchmark tests with ${client_count} clients..."
52+
53+
for framework in Redisson Jedis Lettuce Redisun; do
54+
echo "Running ${framework} benchmark with ${client_count} clients..."
55+
mvn test -Dtest=${framework}Benchmark -Dclient.count=${client_count} > ${framework}_${client_count}.log 2>&1 || true
56+
done
57+
done
58+
59+
# 提取测试结果
60+
- name: 提取测试结果
61+
run: |
62+
echo "# Redisun vs Redisson vs Jedis vs Lettuce 性能测试报告" > benchmark-report.md
63+
echo "测试时间: $(date)" >> benchmark-report.md
64+
echo "" >> benchmark-report.md
65+
echo "## 测试环境" >> benchmark-report.md
66+
echo "- 操作系统: Ubuntu 20.04" >> benchmark-report.md
67+
echo "- Java 版本: JDK 8" >> benchmark-report.md
68+
echo "- Redis 版本: latest" >> benchmark-report.md
69+
echo "- 测试键数量: 50000" >> benchmark-report.md
70+
echo "" >> benchmark-report.md
71+
72+
echo "## 详细数据" >> benchmark-report.md
73+
for case in "CONCURRENT SET" "CONCURRENT GET" "ASYNC SET" "ASYNC GET"; do
74+
echo "### ${case}" >> benchmark-report.md
75+
echo "| Concurrency | Redisun COST | Redisson COST | Jedis COST | Lettuce COST | Redisun OPS | Redisson OPS | Jedis OPS | Lettuce OPS |" >> benchmark-report.md
76+
echo "|------------|-------------|--------------|-----------|-------------|-------------|--------------|-----------|-------------|" >> benchmark-report.md
77+
# 遍历所有客户端数量提取结果
78+
for client_count in 1 8 16 64 128 1024 2048; do
79+
echo -n "|${client_count}|" >> benchmark-report.md
80+
81+
# 耗时
82+
for framework in Redisun Redisson Jedis Lettuce; do
83+
if grep -q "\[${case}\] cost:" ${framework}_${client_count}.log; then
84+
cost_time=$(grep "\[${case}\] cost:" ${framework}_${client_count}.log | awk '{print $4}')
85+
echo -n "${cost_time}|" >> benchmark-report.md
86+
else
87+
echo -n "N/A|" >> benchmark-report.md
88+
fi
89+
done
90+
91+
# OPS
92+
for framework in Redisun Redisson Jedis Lettuce; do
93+
if grep -q "\[${case}\] ops/s:" ${framework}_${client_count}.log; then
94+
ops=$(grep "\[${case}\] ops/s:" ${framework}_${client_count}.log | awk '{print $4}')
95+
echo -n "${ops}|" >> benchmark-report.md
96+
else
97+
echo -n "N/A|" >> benchmark-report.md
98+
fi
99+
done
100+
echo "" >> benchmark-report.md
101+
done
102+
echo "" >> benchmark-report.md
103+
done
104+
105+
echo "> 注意:由于 GitHub Actions 环境限制,测试结果可能不如本地环境准确。Jedis 不支持原生异步操作,因此标记为 -。" >> benchmark-report.md
106+
echo "" >> benchmark-report.md
107+
108+
# 显示报告内容
109+
cat benchmark-report.md
110+
111+
# 上传测试报告作为工件
112+
- name: 上传测试报告
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: benchmark-report
116+
path: benchmark-report.md

0 commit comments

Comments
 (0)