File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ RUN_TIME=10 #测试时间
16
16
CORES=1 # mysql服务器的并发数 #默认本机核心数
17
17
18
18
# 全局变量
19
- selfversion=' 0.1 '
19
+ selfversion=' 0.2 '
20
20
installType=' apt -y install'
21
21
removeType=' apt -y remove'
22
22
upgrade=" apt -y update"
@@ -215,7 +215,7 @@ echo "--------------------------------------------------------------------------
215
215
216
216
# 模式列表
217
217
modes=(" oltp_read_write" " oltp_read_only" " oltp_insert" " oltp_update_non_index" )
218
- weights=(80 10 5 5 ) # 对应上面模式的权重
218
+ weights=(80 5 60 50 ) # 对应上面模式的权重
219
219
mode_scores=(0 0 0 0) # 每个模式总得分
220
220
mode_counts=(0 0 0 0) # 每个模式测试次数
221
221
@@ -244,9 +244,8 @@ while IFS= read -r line; do
244
244
done < " $LOG_FILE "
245
245
246
246
echo
247
+ _yellow " 得分情况(仅供参考!)"
247
248
echo " --------------------------------------------------------------------------"
248
- echo
249
-
250
249
final_score=0
251
250
252
251
for i in " ${! modes[@]} " ; do
@@ -266,10 +265,8 @@ for i in "${!modes[@]}"; do
266
265
printf " %-22s 平均分: %-6s 权重: %-2s%% → 加权: %s\n" " $mode " " $avg " " $weight " " $weighted "
267
266
final_score=$(( final_score + weighted))
268
267
done
269
- echo
270
268
echo " --------------------------------------------------------------------------"
271
- echo
272
- _green " 最终综合得分:$final_score 分"
269
+ _green " 总得分:$final_score 分"
273
270
274
271
275
272
# 脚本退出时清理
You can’t perform that action at this time.
0 commit comments