标记一个即时(没有持续时间) trace event。
profileMark(name: string, option?: { flowId: number, arg?: Record<string, string>}): void;
trace event 的名称。
额外选项,如 flowId 和自定义参数(arg)。
flowId
arg
// 标记一个即时 trace event lynx.performance.profileMark('FetchStarted'); // 标记一个即时 trace event 并添加自定义参数 lynx.performance.profileMark('FetchStarted', { args: { status: 'initiated' }, }); // 标记一个 flow 类型的即时 trace event const flowId = lynx.performance.profileFlowId(); lynx.performance.profileMark('ActionCheckpoint', { flowId }); // 标记一个 flow 类型的即时 trace event 并添加自定义参数 lynx.performance.profileMark('ProcessMidpoint', { args: { step: 'middle' }, flowId, });
LCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.