Package ej.benchmark
Class BenchResult
- java.lang.Object
-
- ej.benchmark.BenchResult
-
public class BenchResult extends Object
Represents the results for a given test.
-
-
Field Summary
Fields Modifier and Type Field Description longemptyRunTimelongfullTimeThe bench time (for all iterations, in nanoseconds).intiterationsThe number of iterations the bench has been ran to reach the time specified inBenchTest.getRunTime().BenchTesttestThe bench itself.
-
Constructor Summary
Constructors Constructor Description BenchResult(BenchTest test, int iterations, long emptyRunTime, long fullTime)Creates a bench result for the given bench.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetBenchTime()Gets the real bench time for one iteration removing the extra work time.
-
-
-
Field Detail
-
test
public final BenchTest test
The bench itself.
-
iterations
public final int iterations
The number of iterations the bench has been ran to reach the time specified inBenchTest.getRunTime().
-
emptyRunTime
public final long emptyRunTime
-
fullTime
public final long fullTime
The bench time (for all iterations, in nanoseconds).
-
-
Constructor Detail
-
BenchResult
public BenchResult(BenchTest test, int iterations, long emptyRunTime, long fullTime)
Creates a bench result for the given bench.- Parameters:
test- the bench which has produced the resultsfullTime- the full bench time (in nanoseconds)emptyRunTime- the bench time to remove fromfullTime(in nanoseconds)iterations- the number of iterations the bench has been ran.
-
-