Package com.illumon.iris.db.tables.utils
Class QueryPerformanceLogThreshold
java.lang.Object
com.illumon.iris.db.tables.utils.QueryPerformanceLogThreshold
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 Summary
ConstructorsConstructorDescriptionQueryPerformanceLogThreshold(String kind, long defaultDuration) 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. The initial and repeated read threshold defaults to 1. -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldLog(long duration, long repeatedReads, long initialReads) Should this item be logged?
-
Constructor Details
-
QueryPerformanceLogThreshold
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 namesdefaultDuration- default value for duration nanos
-
-
Method Details
-
shouldLog
public boolean shouldLog(long duration, long repeatedReads, long initialReads) Should this item be logged?- Parameters:
duration- the duration (or usage) of the itemrepeatedReads- the number of repeated reads which occurredinitialReads- the number of initial reads which occurred- Returns:
- true if the item exceeds our logging threshold, and thus should be logged
-