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/markevent.md
Normal file
36
docs/api/debug/profiler/markevent.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Profiler::MarkEvent
|
||||
|
||||
```cpp
|
||||
void MarkEvent(const char* name, uint64_t timestamp, uint32_t threadId)
|
||||
```
|
||||
|
||||
**状态:** 此方法目前为空实现,暂未功能。
|
||||
|
||||
在指定时间点标记一个事件。用于记录离散的瞬时事件,如 GPU 命令提交、状态切换等,通常用于多线程性能分析。
|
||||
|
||||
**参数:**
|
||||
- `name` - 事件名称
|
||||
- `timestamp` - 事件发生的时间戳(微秒)
|
||||
- `threadId` - 事件所属的线程 ID
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Debug/Profiler.h>
|
||||
|
||||
// 在多线程场景中标记事件
|
||||
void WorkerThread() {
|
||||
uint32_t tid = GetCurrentThreadId();
|
||||
uint64_t ts = GetTickCount();
|
||||
|
||||
XCEngine::Debug::Profiler::Get().MarkEvent("TaskStarted", ts, tid);
|
||||
DoWork();
|
||||
XCEngine::Debug::Profiler::Get().MarkEvent("TaskCompleted", GetTickCount(), tid);
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [Profiler 总览](profiler.md) - 返回类总览
|
||||
Reference in New Issue
Block a user