文件最后提交记录最后更新时间
【docs】:英文开源资料合入 Co-authored-by: zzm30<zhengzhimin1@h-partners.com> # message auto-generated for no-merge-commit merge: !357 merge master into master 【docs】:英文开源资料合入 Created-by: zzm30 Commit-by: zzm30 Merged-by: ascend-robot Description: # PR 合入模板 ## 1. 修改描述 1. 英文开源资料翻译回稿,需要合入开源社区,再进行进一步的链接以及内容的校准。 See merge request: Ascend/msserviceprofiler!3576 天前
docs: 资料合入英文文档 Co-authored-by: cai-weiwei1989<734267852@qq.com> # message auto-generated for no-merge-commit merge: !246 merge master into master docs: 资料合入英文文档 Created-by: cai-weiwei1989 Commit-by: cai-weiwei1989 Merged-by: ascend-robot Description: ### 1. 修改描述 - **修改原因:** - **修改内容:** docs: 资料合入英文文档 - [ ] **涉及代码双合**(贴上另一个PR链接): ---- ### 2. 功能验证 - [ ] **功能自验** - [ ] **本地自验用例截图**(请确保不体现个人信息) - [ ] **冒烟是否通过** ---- ### 3. 代码检视 - **要求:** - 合入代码大于 200 行,需三人以上会议检视。 - 检视密度≥2个/100行。 - 检视缺陷密度达不到要求的需给出说明。 - 大于 1000 行代码原则上不允许合入,需进行备案。 - [ ] **是否经过代码检视** - [ ] **是否具备UT测试用例看护** ---- ### 4. 安全自检 **典型安全编码问题** - [ ] **若涉及对外接口,是否已校验外部数据** - [ ] **MR 标题和描述是否按格式填写** - [ ] **是否进行空指针校验** - [ ] **是否进行返回值校验** - [ ] **是否正确考虑文件权限配置** - [ ] **是否充分考虑接口的异常场景** - [ ] **是否正确记录错误日志** - [ ] **若涉及正则表达式,是否对正则表达式做 ReDos 校验** - [ ] **若涉及运算,是否存在整数溢出、除零等风险** ---- ### 5. 变更知会 - **资料修改:** - **变更通知(消息知会 + 邮件知会):** ---- ### 6. 冒烟修改 - **PR 来源:** - [ ] 问题单 - [ ] 需求特性 - [ ] 安全排查 - [ ] 其他 - [ ] **是否存在冒烟可以拦截却未拦截的情况** - [ ] **是否需要添加冒烟:** ---- See merge request: Ascend/msserviceprofiler!2462 个月前
README.md

General Description

API Description

The msServiceProfiler module offers Python APIs for profiling inference services.

For details about the functions and usage examples of these APIs, see Data Collection.

Python API import: from ms_service_profiler import Profiler, Level

API List

The specific APIs are as follows:

Table 1 Serving data profiling APIs (Python)

Interface Description
init Performs initialization.
enter/exit Upon entry, automatically calls the span_start function to record the start time of a process; upon exit, automatically calls the span_end function to record the end time of a process.
span_start Records the start point of a process.
span_end Records the end point of a process.
event Records an event.
link Records the association between different resources.
metric Records a metric value.
metric_inc Records an incremental metric value.
metric_scope Defines a metric scope.
metric_scope_as_req_id Sets the metric scope to the request level.
launch Flushes the request record to the disk.
attr Adds an attribute and returns the current object. Chain calls are supported.
domain Specifies a domain for the data, where records with the same domain are grouped together in trace data.
res Assigns a resource ID, where data and timeline are associated based on the resource ID.
get_msg Obtains the currently recorded data.