Files
XCEngine/docs/api/XCEngine/Debug/Profiler/ExportChromeTracing.md

37 lines
831 B
Markdown
Raw Normal View History

2026-03-26 16:45:24 +08:00
# Profiler::ExportChromeTracing
2026-03-26 17:21:44 +08:00
将采样结果导出为 Chrome Tracing 格式文件。
2026-03-26 16:45:24 +08:00
```cpp
void ExportChromeTracing(const Containers::String& filePath);
```
2026-03-26 17:21:44 +08:00
## 行为说明
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
当前实现是空函数,不会创建文件,也不会导出任何样本。
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
从 API 形状可以推断,这个接口是为后续接入 Chrome Trace 或 Perfetto 类工具预留的;但在当前版本中,调用它不会产生可见效果。
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
## 参数
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
- `filePath` - 预期的输出文件路径。当前实现不会实际使用该参数。
## 返回值
- 无。
## 线程语义
2026-03-26 16:45:24 +08:00
2026-03-26 17:21:44 +08:00
- 当前为空实现,无额外线程语义。
## 示例
```cpp
XCEngine::Debug::Profiler::Get().ExportChromeTracing("trace.json");
2026-03-26 16:45:24 +08:00
```
## 相关文档
2026-03-26 17:21:44 +08:00
- [返回类型总览](Profiler.md)
- [Profiler Workflow](../../../_guides/Debug/Profiler-Workflow.md)