Record Class BenchmarkResult

java.lang.Object
java.lang.Record
org.episteme.benchmarks.benchmark.BenchmarkResult

public record BenchmarkResult(String benchmarkId, String benchmarkName, String provider, String domain, String status, long timestamp, long totalTimeMillis, long iterations, double averageTimePerOpMillis, double operationsPerSecond, long memoryUsedBytes, Map<String,String> environmentInfo, Map<String,Object> extraMetrics) extends Record
Captures the performance metrics of a single benchmark run.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • BenchmarkResult

      public BenchmarkResult(String benchmarkId, String benchmarkName, String provider, String domain, long totalTimeMillis, long iterations, double averageTimePerOpMillis, double operationsPerSecond, long memoryUsedBytes, Map<String,Object> extraMetrics)
    • BenchmarkResult

      public BenchmarkResult(String provider, String domain, Map<String,String> metrics)
      Convenience constructor for expanded results (e.g. from High-Precision Audit).
    • BenchmarkResult

      public BenchmarkResult(String name, String provider, String domain, double latencyMs)
    • BenchmarkResult

      public BenchmarkResult(String benchmarkId, String benchmarkName, String provider, String domain, String status, long timestamp, long totalTimeMillis, long iterations, double averageTimePerOpMillis, double operationsPerSecond, long memoryUsedBytes, Map<String,String> environmentInfo, Map<String,Object> extraMetrics)
      Creates an instance of a BenchmarkResult record class.
      Parameters:
      benchmarkId - the value for the benchmarkId record component
      benchmarkName - the value for the benchmarkName record component
      provider - the value for the provider record component
      domain - the value for the domain record component
      status - the value for the status record component
      timestamp - the value for the timestamp record component
      totalTimeMillis - the value for the totalTimeMillis record component
      iterations - the value for the iterations record component
      averageTimePerOpMillis - the value for the averageTimePerOpMillis record component
      operationsPerSecond - the value for the operationsPerSecond record component
      memoryUsedBytes - the value for the memoryUsedBytes record component
      environmentInfo - the value for the environmentInfo record component
      extraMetrics - the value for the extraMetrics record component
  • Method Details

    • toSummaryString

      public String toSummaryString()
    • toString

      public final 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.
    • benchmarkId

      public String benchmarkId()
      Returns the value of the benchmarkId record component.
      Returns:
      the value of the benchmarkId record component
    • benchmarkName

      public String benchmarkName()
      Returns the value of the benchmarkName record component.
      Returns:
      the value of the benchmarkName record component
    • provider

      public String provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • domain

      public String domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • status

      public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • timestamp

      public long timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component
    • totalTimeMillis

      public long totalTimeMillis()
      Returns the value of the totalTimeMillis record component.
      Returns:
      the value of the totalTimeMillis record component
    • iterations

      public long iterations()
      Returns the value of the iterations record component.
      Returns:
      the value of the iterations record component
    • averageTimePerOpMillis

      public double averageTimePerOpMillis()
      Returns the value of the averageTimePerOpMillis record component.
      Returns:
      the value of the averageTimePerOpMillis record component
    • operationsPerSecond

      public double operationsPerSecond()
      Returns the value of the operationsPerSecond record component.
      Returns:
      the value of the operationsPerSecond record component
    • memoryUsedBytes

      public long memoryUsedBytes()
      Returns the value of the memoryUsedBytes record component.
      Returns:
      the value of the memoryUsedBytes record component
    • environmentInfo

      public Map<String,String> environmentInfo()
      Returns the value of the environmentInfo record component.
      Returns:
      the value of the environmentInfo record component
    • extraMetrics

      public Map<String,Object> extraMetrics()
      Returns the value of the extraMetrics record component.
      Returns:
      the value of the extraMetrics record component