Files
XCEngine/docs/api/debug/profiler/endframe.md

33 lines
654 B
Markdown
Raw Normal View History

# Profiler::EndFrame
```cpp
void EndFrame()
```
2026-03-20 02:35:07 +08:00
结束一帧的性能分析。清空当前帧采集的所有样本数据,准备记录下一帧的性能数据。应在每帧渲染结束时调用。
**注意:** 此方法仅清空样本数据,不会计算或导出帧耗时信息。
**返回:** `void`
**线程安全:** ✅ 线程安全
**复杂度:** O(1)
**示例:**
```cpp
#include <XCEngine/Debug/Profiler.h>
void GameLoop() {
XCEngine::Debug::Profiler::Get().BeginFrame();
Update();
Render();
XCEngine::Debug::Profiler::Get().EndFrame();
}
```
## 相关文档
- [Profiler 总览](profiler.md) - 返回类总览