标记一个 trace event 的开始。
profileStart(name: string, option?: { flowId: number, arg?: Record<string, string>}): void;
trace event 的名称。
额外选项,例如 flowId 和自定义参数(arg)。
flowId
arg
// 开始一个 trace event。 lynx.performance.profileStart('DataFetch'); // 开始一个 trace event 并添加自定义参数 lynx.performance.profileStart('DataFetch', { args: { url: 'https://api.example.com/data', method: 'GET' }, }); // 开始一个 flow 类型的 trace event const flowId = lynx.performance.profileFlowId(); lynx.performance.profileStart('UserAction', { flowId }); // 开始一个 flow 类型的 trace event 并添加自定义参数 lynx.performance.profileStart('ComplexProcess', { args: { step: 'start' }, flowId, });
LCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.