更新脚本优化点
This commit is contained in:
@@ -70,6 +70,7 @@ class LogManager:
|
||||
f.write("\n=== Cell统计 ===\n")
|
||||
cell_stats = statistics_data['cell_statistics']
|
||||
f.write(f"涉及Cell总数: {len(cell_stats)}\n")
|
||||
f.write(f"{"="*30}\n")
|
||||
|
||||
# 按Cell编号排序
|
||||
sorted_cells = sorted(cell_stats.keys(), key=lambda x: int(x) if x.isdigit() else x)
|
||||
@@ -99,15 +100,16 @@ class LogManager:
|
||||
fail_items.append(f"{messageappend})")
|
||||
|
||||
# 写入Cell统计信息
|
||||
f.write(f"Cell {cell}: 文件数={file_count}, SN:{sn_list}, FAIL数={fail_count}\n")
|
||||
f.write(f" Cell {cell}: 文件数={file_count}, SN:{sn_list}, FAIL数={fail_count}\n")
|
||||
|
||||
# 如果有失败项,写入失败详情
|
||||
if fail_items:
|
||||
f.write(f" FAIL项:\n{'\n'.join(fail_items)}\n")
|
||||
f.write(f" FAIL项:\n ->{'\n ->'.join(fail_items)}\n")
|
||||
|
||||
# SN统计(优化后的格式)
|
||||
if statistics_data.get('sn_statistics'):
|
||||
f.write("\n=== SN统计 ===\n")
|
||||
f.write(f"{"=" * 30}\n")
|
||||
sn_stats = statistics_data['sn_statistics']
|
||||
|
||||
# 按SN排序(按字母顺序)
|
||||
@@ -138,11 +140,11 @@ class LogManager:
|
||||
fail_items.append(f"{messageappend})")
|
||||
|
||||
# 写入SN统计信息
|
||||
f.write(f"SN {sn}: 文件数={file_count}, Cell数={len(cells)}, FAIL数={fail_count}\n")
|
||||
f.write(f" SN {sn}: 文件数={file_count}, Cell数={len(cells)}, FAIL数={fail_count}\n")
|
||||
|
||||
# 如果有失败项,写入失败详情
|
||||
if fail_items:
|
||||
f.write(f" FAIL项:\n{'\n'.join(fail_items)}\n")
|
||||
f.write(f" FAIL项:\n ->{'\n ->'.join(fail_items)}\n")
|
||||
|
||||
# 失败项统计
|
||||
if statistics_data.get('failure_details'):
|
||||
|
||||
Reference in New Issue
Block a user