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 Details

    • ConcurrentResult

      public ConcurrentResult(int threads, int iterationsPerThread, int successCount, int failureCount, Duration totalDuration, List<Throwable> errors)
      Creates an instance of a ConcurrentResult record class.
      Parameters:
      threads - the value for the threads record component
      iterationsPerThread - the value for the iterationsPerThread record component
      successCount - the value for the successCount record component
      failureCount - the value for the failureCount record component
      totalDuration - the value for the totalDuration record component
      errors - the value for the errors record component
  • Method Details

    • totalIterations

      public int totalIterations()
    • throughput

      public double throughput()
    • allSucceeded

      public boolean allSucceeded()
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • threads

      public int threads()
      Returns the value of the threads record component.
      Returns:
      the value of the threads record component
    • iterationsPerThread

      public int iterationsPerThread()
      Returns the value of the iterationsPerThread record component.
      Returns:
      the value of the iterationsPerThread record component
    • successCount

      public int successCount()
      Returns the value of the successCount record component.
      Returns:
      the value of the successCount record component
    • failureCount

      public int failureCount()
      Returns the value of the failureCount record component.
      Returns:
      the value of the failureCount record component
    • totalDuration

      public Duration totalDuration()
      Returns the value of the totalDuration record component.
      Returns:
      the value of the totalDuration record component
    • errors

      public List<Throwable> errors()
      Returns the value of the errors record component.
      Returns:
      the value of the errors record component