已合并
增加对PROF路径依赖的打屏说明 #404
wangzixuan创建于 20 天前
增加对PROF路径依赖的打屏说明 #404
已合并
wangzixuan创建于 20 天前
wangzixuan成员
20 天前

PR 合入模板

注:经过自检不涉及的可标注“不涉及”或直接打勾,特殊情况请文字备注。不符合规范的 PR 不允许合入,请(后备)commit 注意。


1. 修改描述

  • 修改原因:
    当前数据解析强依赖指定解析的文件命名为PROF,当前仅在log日志中记录相关问题,无法显示提示用户相关依赖
  • 修改内容:
    增加对于相关日志的打屏提示

2. 功能验证


3. 分支合并要求


3. 代码检视

  • 要求:

    • 合入代码超过 200 行,需三人以上会议检视。
    • 检视密度≥1个/100行。
    • 检视缺陷密度未达要求需提供说明。
    • 大于 1000 行代码原则上不允许合入,需进行备案。
  • 检视意见数:____ 条 (请填写本次检视的意见总数,用于commit合入前审视)


4. 安全自检

Python、C++

C++


5. 变更知会


likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 wangzixuan 的贡献)
atomgit-bot
atomgit-bot
20 天前 评论:

变更摘要

此 PR 在 ExportManager::CheckProfDirsValid() 函数中增加了一条面向用户的错误提示输出。当检测到 profPath_ 路径不包含 "PROF" 子串时,除了原有的 ERROR 日志记录外,新增了 PRINT_ERROR 宏调用,向终端输出更明确的说明信息,提示用户该路径下未找到以 "PROF" 开头的文件名并建议核对文件正确性。


主要改动

  • 新增用户可见的错误提示输出:在 analysis/csrc/application/export_manager.cppCheckProfDirsValid() 中,当路径校验失败时,新增 PRINT_ERROR("No file names starting with 'PROF' were found under this path: %. Please verify the file correctness.", profPath_) 调用,与已有的 ERROR 日志互补,使终端用户能直接看到路径不符合要求的说明。
likedislike
atomgit-bot
atomgit-bot
20 天前 评论:

代码审查

经过全面分析,这个变更只是在 CheckProfDirsValid() 中新增了一条 PRINT_ERROR 调用,用于在路径校验失败时向用户输出更友好的错误提示。

审查要点检查结果:

  1. 逻辑正确性:新增的 PRINT_ERROR 调用在 return false 之前执行,与同文件 Init() 函数(第125-129行)和 CreateOutputPath() 函数(第44-45行)中 ERROR + PRINT_ERROR 成对出现的模式完全一致。不改变控制流,不引入逻辑错误。

  2. 格式化字符串:项目使用自定义 Format 函数(log.h 第86-108行),以单个 % 作为占位符。新增消息中的 %. 格式与 Init() 中第125行的 %. 用法一致,% 被替换为 profPath_ 后,. 作为普通字符保留输出,格式化行为正确。

  3. 安全性:无敏感信息泄露、无路径遍历、无注入风险。

  4. 性能:仅在错误路径上添加一条日志输出,无性能影响。


审查总结

本次变更共审查 1 个文件:

  • analysis/csrc/application/export_manager.cpp无问题

各优先级问题数量:

  • P0: 0
  • P1: 0
  • P2: 0
  • P3: 0

整体风险评估:低风险。 变更为在路径校验失败时增加一条用户友好的屏幕输出,遵循已有代码模式,逻辑简单明确,可安全合入。

类型 数量
🔴 阻塞 0
🟡 建议 1

💬 仅评论

likedislike
ascend-robotascend-robot成员
20 天前 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
20 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-Ascend/msprof 潘杨杰, 陈豪 (2/2) 潘杨杰 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

Seanesmhxocism, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了82条消息 查看更多
ascend-robotascend-robot成员
19 天前 添加了label:approvedlgtm
ascend-robotascend-robot成员
19 天前 关闭了关联的issue
ascend-robotascend-robot成员
19 天前 合入了pull request
ascend-robot
ascend-robot成员
19 天前 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike
ascend-robot
ascend-robot成员
19 天前 评论:

Pull Request 已合并或已关闭。

If you want to solve this problem, you can click here to do it in the FAQs.

likedislike