Record Class ConcurrentTester.ConcurrentResult
java.lang.Object
java.lang.Record
cloud.opencode.base.test.concurrent.ConcurrentTester.ConcurrentResult
- Record Components:
threads- the number of threads | 线程数iterationsPerThread- iterations per thread | 每线程迭代次数successCount- success count | 成功次数failureCount- failure count | 失败次数totalDuration- total duration | 总时长errors- the errors | 错误列表
- Enclosing class:
ConcurrentTester
public static record ConcurrentTester.ConcurrentResult(int threads, int iterationsPerThread, int successCount, int failureCount, Duration totalDuration, List<Throwable> errors)
extends Record
Concurrent test result
并发测试结果
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentResult(int threads, int iterationsPerThread, int successCount, int failureCount, Duration totalDuration, List<Throwable> errors) Creates an instance of aConcurrentResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfinal booleanIndicates whether some other object is "equal to" this one.errors()Returns the value of theerrorsrecord component.intReturns the value of thefailureCountrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationsPerThreadrecord component.intReturns the value of thesuccessCountrecord component.intthreads()Returns the value of thethreadsrecord component.doubletoString()Returns a string representation of this record class.Returns the value of thetotalDurationrecord component.int
-
Constructor Details
-
ConcurrentResult
public ConcurrentResult(int threads, int iterationsPerThread, int successCount, int failureCount, Duration totalDuration, List<Throwable> errors) Creates an instance of aConcurrentResultrecord class.- Parameters:
threads- the value for thethreadsrecord componentiterationsPerThread- the value for theiterationsPerThreadrecord componentsuccessCount- the value for thesuccessCountrecord componentfailureCount- the value for thefailureCountrecord componenttotalDuration- the value for thetotalDurationrecord componenterrors- the value for theerrorsrecord component
-
-
Method Details
-
totalIterations
public int totalIterations() -
throughput
public double throughput() -
allSucceeded
public boolean allSucceeded() -
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. -
threads
-
iterationsPerThread
public int iterationsPerThread()Returns the value of theiterationsPerThreadrecord component.- Returns:
- the value of the
iterationsPerThreadrecord component
-
successCount
public int successCount()Returns the value of thesuccessCountrecord component.- Returns:
- the value of the
successCountrecord component
-
failureCount
public int failureCount()Returns the value of thefailureCountrecord component.- Returns:
- the value of the
failureCountrecord component
-
totalDuration
Returns the value of thetotalDurationrecord component.- Returns:
- the value of the
totalDurationrecord component
-
errors
-