- 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
923 B
923 B
Profiler::MarkEvent
void MarkEvent(const char* name, uint64_t timestamp, uint32_t threadId)
状态: 此方法目前为空实现,暂未功能。
在指定时间点标记一个事件。用于记录离散的瞬时事件,如 GPU 命令提交、状态切换等,通常用于多线程性能分析。
参数:
name- 事件名称timestamp- 事件发生的时间戳(微秒)threadId- 事件所属的线程 ID
复杂度: O(1)
示例:
#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 总览 - 返回类总览