Skip to content

runEventTimingFunction (Log Application Performance)

Compatible with:
  • Purpose
  • This command is used to get the performance timing metric for key events like DOMLoad, PageLoad, etc. using pre-built (Worksoft SaaS natively supported) javascript functions based on the Resource Timing API that many browsers support. If you want to use your own JavaScript functions instead use the command 'runScript' to execute your custom JavaScript function and then log the return value from those functions by using the 'setEventTiming' command.

    When you want to use this command without/outside the block, in the target field, provide timers to calculate and time unit with the pipe symbol.

    Below are the representations:
    M - Minutes
    S - Seconds
    MS - Milli Seconds
    H - Hours

    Following are the list of browser events that are supported
    - connect
    - dns
    - domcomplete
    - domload
    - dominteractive
    - fetch
    - load
    - redirect
    - timetofirstbyte
    - response
    - ssl
    - unload
    - pageload

    In addition to the above events following events that are provided by Google PageSpeed Insights module are also supported - cls (Cummulative Layout Shift)
    - fid (First Input Delay)
    - lcp (Largest Contentful Paint)
    - fcp (First Contentful Paint)

    By default for PageSpeed insights events are fetched from Metrics of end users' page loading experience.
    If you are interested in fetching the lighthouse metrics, you can provide keyword 'lighthouse' in the target field.
  • Syntax
  • runEventTimingFunction (functionName)
  • Target
  • functionName||M/S/MS/H||lighthouse
  • Value
  • Comma separated variable names/variableName
  • Return Value
  • N/A
 

Feedback and Knowledge Base