Class QueryPerformanceLogThreshold

java.lang.Object
io.deephaven.engine.table.impl.perf.QueryPerformanceLogThreshold

public class QueryPerformanceLogThreshold extends Object
This class encapsulates the parameters that control whether a given item (nugget or entry interval) is logged to one of our three performance logs.
  • Constructor Details

    • QueryPerformanceLogThreshold

      public QueryPerformanceLogThreshold(String kind, long defaultDuration, long defaultReadCount, long defaultMetadataOperationCount)
      Create a log threshold object for a particular kind of log update.
      • "" is for instrumented QueryPerformanceLog/QueryOperationPerformanceLog nuggets
      • "Uninstrumented" is for uninstrumented QueryPerformanceLog/QueryOperationPerformanceLog nuggets, and
      • "Update" is for UpdatePerformanceLog entry intervals.
      Parameters:
      kind - kind of update to derive property names
      defaultDuration - default value for duration nanos
      defaultReadCount - default value for the minimum read count threshold
      defaultMetadataOperationCount - default value for the minimum metadata operation count threshold
    • QueryPerformanceLogThreshold

      public QueryPerformanceLogThreshold(String kind, long defaultDuration)
      Create a log threshold object for a particular kind of log update. The minimum read count defaults to 1.
      • "" is for instrumented QueryPerformanceLog/QueryOperationPerformanceLog nuggets
      • "Uninstrumented" is for uninstrumented QueryPerformanceLog/QueryOperationPerformanceLog nuggets, and
      • "Update" is for UpdatePerformanceLog entry intervals.
      Parameters:
      kind - kind of update to derive property names
      defaultDuration - default value for duration nanos
  • Method Details

    • shouldLog

      public boolean shouldLog(long duration, long dataReadCount, long metadataOperationCount)
      Should this item be logged?
      Parameters:
      duration - the duration (or usage) of the item
      dataReadCount - the number of data read operations performed
      metadataOperationCount - the number of metadata operations performed
      Returns:
      true if the item exceeds our logging threshold, and thus should be logged