Skip to main content

函数:push

函数:set_stamp_trace_message

C函数原型aclError aclprofSetStampTraceMessage(void *stamp, const char *msg, uint32_t msgLen)
Python函数ret = acl.prof.set_stamp_trace_message(stamp, msg, msg_len**)**
函数功能为msproftx事件标记携带字符串描述,在Profiling解析并导出结果中msprof_tx summary数据展示。同步接口。 Profiling解析并导出结果请参见《性能分析工具使用指南》下的“性能数据文件参考>msproftx数据说明”。
输入说明stamp:int,Stamp指针地址,指代msproftx事件标记。指定函数:create_stamp接口的指针地址。 msg:int,字符串内容地址。 msg_len:int,字符串长度。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

函数:mark

C函数原型aclError aclprofMark(void *stamp)
Python函数ret = acl.prof.mark(stamp)
函数功能msproftx标记瞬时事件。同步接口。 调用此接口后,Profiling自动在Stamp中加上当前时间戳,将Event type设置为Mark,表示开始一次msproftx采集。
输入说明stamp:int,Stamp指针地址,指代msproftx事件标记。指定函数:create_stamp接口的指针地址。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

函数:push

C函数原型aclError aclprofPush(void *stamp)
Python函数ret = acl.prof.push(stamp)
函数功能msproftx用于记录事件发生的时间跨度的开始时间。同步接口。 调用此接口后,Profiling自动在Stamp中记录开始的时间戳,将Event type设置为Push/Pop。
输入说明stamp:int,Stamp指针地址,指代msproftx事件标记。指定acl.prof.create_stamp接口的指针地址。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明- 与函数:pop接口成对使用,表示时间跨度的开始和结束。
- 不能跨线程调用,若需要跨线程可使用函数:range_start/函数:range_stop接口。
- 在函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

函数:pop

C函数原型aclError aclprofPop()
Python函数ret = acl.prof.pop()
函数功能msproftx用于记录事件发生的时间跨度的结束时间。同步接口。 调用此接口后,Profiling自动在Stamp中记录采集结束的时间戳。
输入说明
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明- 与函数:push接口成对使用,表示时间跨度的开始和结束。
- 不能跨线程调用。若需要跨线程可使用函数:range_start/函数:range_stop接口。
- 在函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

函数:range_start

C函数原型aclError aclprofRangeStart(void *stamp, uint32_t *rangeId)
Python函数range_id, ret = acl.prof.range_start(stamp)
函数功能msproftx用于记录事件发生的时间跨度的开始时间。同步接口。 调用此接口后,Profiling自动在Stamp记录采集开始的时间戳,将Event type设置为Start/Stop,生成一个进程唯一的id,并将Stamp保存在以进程粒度维护的一个map中。
输入说明stamp:int,Stamp指针地址,指代msproftx事件标记。指定函数:create_stamp接口的指针地址。
返回值说明range_id:int msproftx事件标记的唯一标识。用于在跨线程时区分。 ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明- 与函数:range_stop接口成对使用,表示时间跨度的开始和结束。
- 可以跨线程调用。
- 在函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

函数:range_stop

C函数原型aclError aclprofRangeStop(uint32_t *rangeId)
Python函数ret = acl.prof.range_stop(range_id)
函数功能msproftx用于记录事件发生的时间跨度的结束时间。同步接口。 调用此接口后,Profiling自动在Stamp中记录采集结束的时间戳。
输入说明range_id:int,msproftx事件标记的唯一标识。用于在跨线程时区分。
返回值说明ret:int,错误码。
- 返回0表示成功。
- 返回其它值表示失败。
约束说明- 与函数:range_stop接口成对使用,表示时间跨度的开始和结束。
- 可以跨线程调用。
- 在函数:create_stamp接口和函数:destroy_stamp接口之间调用。
参考资源接口调用示例,参见Profiling性能数据采集

父主题: Profiling pyACL API for Extension(Profiling pyACL API扩展接口)

在线提单