Package at.jku.dke.etutor.task_app.test
Record Class RequestStatistic
java.lang.Object
java.lang.Record
at.jku.dke.etutor.task_app.test.RequestStatistic
- Record Components:
type
- The type of the request (sync or async).duration
- The duration of the request in milliseconds.failed
- Whether the request failed or not.
A record that holds the statistics of a request.
-
Constructor Summary
ConstructorsConstructorDescriptionRequestStatistic
(String type, long duration, boolean failed) Creates an instance of aRequestStatistic
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
duration()
Returns the value of theduration
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
failed()
Returns the value of thefailed
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
Method Details
-
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 '=='. -
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
duration
public long duration()Returns the value of theduration
record component.- Returns:
- the value of the
duration
record component
-
failed
public boolean failed()Returns the value of thefailed
record component.- Returns:
- the value of the
failed
record component
-