object Benchmark
- Alphabetic
- Benchmark
- scala.AnyRef
- scala.Any
- Hide All
- Show All
- Public
- All
Variable
Method
-
def
apply[A](targets: (String, () ⇒ A)*)(implicit arg0: Numeric[A]): Unit
Run with defaults
Run with defaults
Runs 4 trials 3 seconds each
All trials are accumulated into final result
- targets
a list of tuples, each representing target name and target function to run. The function return will be converted to Long and average value will be displayed in the results
- Definition Classes
- Benchmark
- Note
All targets must return
same
numeric type (Int, Long, Double, etc.)
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trials[A](trialCount: Int, trialLengthMillis: Long, targets: (String, () ⇒ A)*)(implicit arg0: Numeric[A]): Unit
Run specified number of trials
Run specified number of trials
Benchmarking is split in several trials, which are equal sub-tests, and their results should be in the same ball park
If some trial appears to be off the line, then something unusual happened, and it is a good reason to re-run the entire test
All trials are accumulated into final result
- trialCount
- number of trials to run
- trialLengthMillis
- length of each trial
- targets
- a list of tuples, each representing target name and target function to run. The function return will be converted to Long and average value will be displayed in the results
- Definition Classes
- Benchmark
- Note
All targets must return
same
numeric type (Int, Long, Double, etc.)
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Benchmark is a basic comparison testing tool
JVM technology makes it difficult to get absolute performance data
Benchmark allows to run several targets side by side, comparing their performance against each other
Let's benchmark 'append' performance for List, Vector and Buffer
The results present three values:
Note.
Absolute values are less informative than following percentages of the largest valueFrom the above example, the following conclusions can be made: