Lynx

Performance

This page documents the Performance CDP domain supported by Lynx DevTool.

Experimental reference

This generated reference is still being completed.

  • CDP events are not included yet.
  • Some Lynx extensions are listed but do not yet have detailed documentation.
  • Method descriptions are not automatically verified against the implementation and may be incomplete or inaccurate.

Verify behavior against the implementation and the linked upstream CDP reference before relying on it.

Overview

Standard Methods

Lynx Extensions

Performance.getAllPerformanceEntries

Returns DevTool-recorded Lynx performance entries for the current page.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_performance_agent.cc
Parameters

No parameters.

Returns
NameTypeDescription
entriesarrayPerformance entry objects recorded by the Lynx performance controller.
entries[].entryTypestringEntry type. The native DevTool cache currently records pipeline entries.
entries[].instanceIdintegerLynx instance id added by PerformanceController before the entry is cached.
entries[].namestringEntry name generated by the timing pipeline, usually derived from the pipeline origin.
entries[].frameworkRenderingTimingobjectTiming markers supplied by the frontend framework.
entries[].hostPlatformTimingobjectTiming markers supplied by the host platform.
Notes
  • Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
  • The executor reads LynxShell::GetAllPerformanceEntries() and wraps the converted array as result.entries.
  • PerformanceController only caches pipeline entries when LynxEnv DevTool is enabled. This is independent of the CDP Performance.enable method.
  • The method returns an empty entries array when there are no cached entries.
  • Cached entries are cleared by PerformanceController::ResetStateBeforeReload().
  • The entry object is extensible. Fields beyond entryType, instanceId, name, frameworkRenderingTiming, and hostPlatformTiming are owned by the Timing API and may vary by pipeline type.
  • The native implementation does not read request params.
  • If the shell has already been destroyed, the current handler sends a response with the request id and no result object.
Examples

Read recorded performance entries

Request:

{
  "id": 1,
  "method": "Performance.getAllPerformanceEntries"
}

Response:

{
  "id": 1,
  "result": {
    "entries": [
      {
        "entryType": "pipeline",
        "instanceId": 1001,
        "name": "loadBundle",
        "frameworkRenderingTiming": {},
        "hostPlatformTiming": {}
      }
    ]
  }
}

Performance.getAllTimingInfo

Returns all Lynx timing information for the current page in microseconds.

  • Origin: lynx-extension
  • Source: devtool/lynx_devtool/agent/domain_agent/inspector_performance_agent.cc
Parameters

No parameters.

Returns
NameTypeDescription
setup_timingobjectSetup timing map prepared by the timing handler.
extra_timingobjectContainer-layer timing map.
metricsobjectComputed timing metric map.
update_timingsobjectMap from update timing flag to the corresponding update timing map.
urlstringCurrent page URL recorded by TimingInfo.
thread_strategyintegerNumeric value of the rendering thread strategy recorded by TimingInfo.
has_reloadbooleanWhether the timing handler has observed a reload for the current page.
ssr_metricsobjectSSR timing metric map, present only when SSR timing data is used.
ssr_render_page_timingobjectSSR render page timing map, present only when SSR timing data is used.
ssr_extra_infoobjectSSR extra info object, present only when SSR timing data is used.
ssr_extra_info.urlstringSSR URL recorded by TimingInfo.
ssr_extra_info.data_sizeintegerSSR data size recorded by TimingInfo.
Notes
  • Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
  • The executor reads LynxShell::GetAllTimingInfo() and uses that object directly as the CDP result.
  • TimingHandler returns TimingInfo::GetAllTimingInfoAsMicrosecond(), so timestamp and duration values in timing maps are microseconds.
  • The nested timing maps are extensible. Their keys are produced by the Timing API and may vary by page lifecycle, pipeline type, platform, and frontend framework markers.
  • The native implementation does not read request params and does not require the CDP Performance.enable method.
  • If the shell has already been destroyed, the current handler sends a response with the request id and no result object.
Examples

Read all timing info

Request:

{
  "id": 1,
  "method": "Performance.getAllTimingInfo"
}

Response:

{
  "id": 1,
  "result": {
    "setup_timing": {},
    "extra_timing": {},
    "metrics": {},
    "update_timings": {},
    "url": "lynx://example/page",
    "thread_strategy": 0,
    "has_reload": false
  }
}
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.