Record Class SlowQueryLog.SlowQueryStats
java.lang.Object
java.lang.Record
com.loomcache.server.query.SlowQueryLog.SlowQueryStats
- Enclosing class:
SlowQueryLog
public static record SlowQueryLog.SlowQueryStats(long totalSlowQueries, double avgDurationMs, long maxDurationMs, List<SlowQueryLog.QueryPattern> topPatterns)
extends Record
Statistics about slow queries grouped by normalized SQL pattern.
-
Constructor Summary
ConstructorsConstructorDescriptionSlowQueryStats(long totalSlowQueries, double avgDurationMs, long maxDurationMs, List<SlowQueryLog.QueryPattern> topPatterns) Creates an instance of aSlowQueryStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgDurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxDurationMsrecord component.Returns the value of thetopPatternsrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalSlowQueriesrecord component.
-
Constructor Details
-
SlowQueryStats
public SlowQueryStats(long totalSlowQueries, double avgDurationMs, long maxDurationMs, List<SlowQueryLog.QueryPattern> topPatterns) Creates an instance of aSlowQueryStatsrecord class.- Parameters:
totalSlowQueries- the value for thetotalSlowQueriesrecord componentavgDurationMs- the value for theavgDurationMsrecord componentmaxDurationMs- the value for themaxDurationMsrecord componenttopPatterns- the value for thetopPatternsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
totalSlowQueries
public long totalSlowQueries()Returns the value of thetotalSlowQueriesrecord component.- Returns:
- the value of the
totalSlowQueriesrecord component
-
avgDurationMs
public double avgDurationMs()Returns the value of theavgDurationMsrecord component.- Returns:
- the value of the
avgDurationMsrecord component
-
maxDurationMs
public long maxDurationMs()Returns the value of themaxDurationMsrecord component.- Returns:
- the value of the
maxDurationMsrecord component
-
topPatterns
Returns the value of thetopPatternsrecord component.- Returns:
- the value of the
topPatternsrecord component
-