For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/lynx-api/lynx/lynx-performance/profile-mark.md.
Lynx
  • English
  • profileMark()

    Marks an instant(point-in-time) event.

    Syntax

    profileMark(name: string, option?: { flowId: number, arg?:  Record<string, string>}): void;

    Parameters

    name

    The name of the instant event.

    option(optional)

    Additional options such as flowId and custom arguments.

    Examples

    // Mark an instant event with only a name
    lynx.performance.profileMark('FetchStarted');
    
    // Mark an instant event with custom arguments
    lynx.performance.profileMark('FetchStarted', {
      args: { status: 'initiated' },
    });
    
    // Mark an instant event with a flow id
    const flowId = lynx.performance.profileFlowId();
    lynx.performance.profileMark('ActionCheckpoint', { flowId });
    
    // Mark an instant event with both arguments and flow id
    lynx.performance.profileMark('ProcessMidpoint', {
      args: { step: 'middle' },
      flowId,
    });

    Compatibility

    LCD tables only load in the browser

    Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.