Class DebugOverflowSettings

All Implemented Interfaces:
HasHandlers

public class DebugOverflowSettings extends DataClass
Configuration to control how excessive overflow is reported when you're debugging overflow.

The general approach is that we track a maximum of maxTrackedOverflows per canvas across a period of trackingDuration, and if a canvas overflows more than selfOverflowThreshold times not due to any child (checked by looking at the visible rect of each child, then we log a message from the affected canvas reporting the threshold was exceeded.

See Also:
  • Constructor Details

    • DebugOverflowSettings

      public DebugOverflowSettings()
    • DebugOverflowSettings

      public DebugOverflowSettings(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static DebugOverflowSettings getOrCreateRef(JavaScriptObject jsObj)
    • setLoggingLevel

      public DebugOverflowSettings setLoggingLevel(LogPriority loggingLevel)
      Logging level to use when reporting that the overflow threshold was exceeded.
      Parameters:
      loggingLevel - New loggingLevel value. Default value is Log.WARN
      Returns:
      DebugOverflowSettings instance, for chaining setter calls
    • getLoggingLevel

      public LogPriority getLoggingLevel()
      Logging level to use when reporting that the overflow threshold was exceeded.
      Returns:
      Current loggingLevel value. Default value is Log.WARN
    • setLoggingTimeout

      public DebugOverflowSettings setLoggingTimeout(Integer loggingTimeout)
      How often to log the overflow threshold being crossed, expressed in milliseconds. A setting of null or zero disable the limitation.

      If this property is a positive number, and fewer than that many milliseconds have elapsed since the last time we logged an overflow problem for a canvas, then logging will be skipped for that canvas.

      Parameters:
      loggingTimeout - New loggingTimeout value. Default value is null
      Returns:
      DebugOverflowSettings instance, for chaining setter calls
    • getLoggingTimeout

      public Integer getLoggingTimeout()
      How often to log the overflow threshold being crossed, expressed in milliseconds. A setting of null or zero disable the limitation.

      If this property is a positive number, and fewer than that many milliseconds have elapsed since the last time we logged an overflow problem for a canvas, then logging will be skipped for that canvas.

      Returns:
      Current loggingTimeout value. Default value is null
    • setMaxTrackedOverflows

      public DebugOverflowSettings setMaxTrackedOverflows(int maxTrackedOverflows)
      Maximum number of overflows to track for each canvas when debugging overflow.
      Parameters:
      maxTrackedOverflows - New maxTrackedOverflows value. Default value is 10
      Returns:
      DebugOverflowSettings instance, for chaining setter calls
    • getMaxTrackedOverflows

      public int getMaxTrackedOverflows()
      Maximum number of overflows to track for each canvas when debugging overflow.
      Returns:
      Current maxTrackedOverflows value. Default value is 10
    • setSelfOverflowThreshold

      public DebugOverflowSettings setSelfOverflowThreshold(int selfOverflowThreshold)
      At what threshold should excessive self-overflows be reported? This value must not exceed maxTrackedOverflows.
      Parameters:
      selfOverflowThreshold - New selfOverflowThreshold value. Default value is 5
      Returns:
      DebugOverflowSettings instance, for chaining setter calls
    • getSelfOverflowThreshold

      public int getSelfOverflowThreshold()
      At what threshold should excessive self-overflows be reported? This value must not exceed maxTrackedOverflows.
      Returns:
      Current selfOverflowThreshold value. Default value is 5
    • setTrackingDuration

      public DebugOverflowSettings setTrackingDuration(int trackingDuration)
      Maximum time interval past which overflow data will be discarded when debugging overflow, measured in milliseconds.
      Parameters:
      trackingDuration - New trackingDuration value. Default value is 10000
      Returns:
      DebugOverflowSettings instance, for chaining setter calls
    • getTrackingDuration

      public int getTrackingDuration()
      Maximum time interval past which overflow data will be discarded when debugging overflow, measured in milliseconds.
      Returns:
      Current trackingDuration value. Default value is 10000