fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
36
docs/api/debug/profiler/beginprofile.md
Normal file
36
docs/api/debug/profiler/beginprofile.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Profiler::BeginProfile
|
||||
|
||||
```cpp
|
||||
void BeginProfile(const char* name)
|
||||
```
|
||||
|
||||
开始一个性能分析块。将分析节点压入栈中并记录开始时间。每次调用 `BeginProfile` 应与一次 `EndProfile` 配对使用。
|
||||
|
||||
**参数:**
|
||||
- `name` - 分析块的名称,用于在导出结果中标识
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Debug/Profiler.h>
|
||||
|
||||
void ProcessMesh() {
|
||||
XCEngine::Debug::Profiler::Get().BeginProfile("ProcessMesh");
|
||||
|
||||
XCEngine::Debug::Profiler::Get().BeginProfile("ComputeVertices");
|
||||
ComputeVertices();
|
||||
XCEngine::Debug::Profiler::Get().EndProfile();
|
||||
|
||||
XCEngine::Debug::Profiler::Get().BeginProfile("ComputeIndices");
|
||||
ComputeIndices();
|
||||
XCEngine::Debug::Profiler::Get().EndProfile();
|
||||
|
||||
XCEngine::Debug::Profiler::Get().EndProfile();
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Profiler 总览](profiler.md) - 返回类总览
|
||||
Reference in New Issue
Block a user