java.lang.Object
java.lang.Record
org.seasar.doma.jdbc.statistic.Statistic
public record Statistic(String sql, long execCount, long execMaxTime, long execMinTime, long execTotalTime, double execAvgTime)
extends Record
Represents a statistic of SQL execution.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculate(long execTimeMillis) Calculates a new instance.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theexecAvgTimerecord component.longReturns the value of theexecCountrecord component.longReturns the value of theexecMaxTimerecord component.longReturns the value of theexecMinTimerecord component.longReturns the value of theexecTotalTimerecord component.final inthashCode()Returns a hash code value for this object.static StatisticCreates an instance.sql()Returns the value of thesqlrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Statistic
public Statistic(String sql, long execCount, long execMaxTime, long execMinTime, long execTotalTime, double execAvgTime) Creates an instance.- Parameters:
sql- the SQLexecCount- the execution countexecMaxTime- the maximum execution time in millisecondsexecMinTime- the minimum execution time in millisecondsexecTotalTime- the total execution time in millisecondsexecAvgTime- the average execution time in milliseconds
-
-
Method Details
-
calculate
Calculates a new instance.- Parameters:
execTimeMillis- the execution time in milliseconds- Returns:
- the new instance
-
of
Creates an instance.- Parameters:
sql- the SQLexecTimeMillis- the execution time in milliseconds- Returns:
- the new instance
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
sql
Returns the value of thesqlrecord component.- Returns:
- the value of the
sqlrecord component
-
execCount
public long execCount()Returns the value of theexecCountrecord component.- Returns:
- the value of the
execCountrecord component
-
execMaxTime
public long execMaxTime()Returns the value of theexecMaxTimerecord component.- Returns:
- the value of the
execMaxTimerecord component
-
execMinTime
public long execMinTime()Returns the value of theexecMinTimerecord component.- Returns:
- the value of the
execMinTimerecord component
-
execTotalTime
public long execTotalTime()Returns the value of theexecTotalTimerecord component.- Returns:
- the value of the
execTotalTimerecord component
-
execAvgTime
public double execAvgTime()Returns the value of theexecAvgTimerecord component.- Returns:
- the value of the
execAvgTimerecord component
-