public class Benchmark extends Object
Constructor and Description |
---|
Benchmark() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
getRandom(int size,
Class<T> c)
Creates an object T from size random bytes.
|
static <T> T |
getRandom(int size,
Class<T> c,
Random r)
Creates an object T from size random bytes.
|
static void |
minibench(int operations,
int threadsPerNode,
Set<Integer> benchmarks)
Default minimal benchmark.
|
public static void minibench(int operations, int threadsPerNode, Set<Integer> benchmarks)
OtpErlangBinary
objects (random data, size =
BENCH_DATA_SIZE
)String
objects (random data, size =
BENCH_DATA_SIZE
)Transaction
or TransactionSingleOp
for each test,Transaction
or TransactionSingleOp
but re-using a single Connection
,Transaction
or
TransactionSingleOp
object.operations
- the number of test runs to executethreadsPerNode
- number of threads to spawn for each existing Scalaris nodebenchmarks
- the benchmarks to run (1-18 or -1 for all benchmarks)public static <T> T getRandom(int size, Class<T> c) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
String
parameter
(in which case the UTF-8 encoding is used for the bytes).T
- the type of the object to createsize
- the number of (random) bytes to createc
- the class of the object to create (needed due to type erasure)IllegalAccessException
- - if this Constructor object enforces Java language access
control and the underlying constructor is inaccessible.IllegalArgumentException
- - if the number of actual and formal parameters differ; if an
unwrapping conversion for primitive arguments fails; or if,
after possible unwrapping, a parameter value cannot be
converted to the corresponding formal parameter type by a
method invocation conversion; if this constructor pertains to
an enum type.InstantiationException
- - if the class that declares the underlying constructor
represents an abstract class.InvocationTargetException
- - if the underlying constructor throws an exception.ExceptionInInitializerError
- - if the initialization provoked by this method fails.NoSuchMethodException
- - if a matching method is not found.SecurityException
- - If a security manager, s, is present and any of the
following conditions is met: invocation of
s.checkMemberAccess(this, Member.PUBLIC) denies access to the
constructor the caller's class loader is not the same as or
an ancestor of the class loader for the current class and
invocation of s.checkPackageAccess() denies access to the
package of this classpublic static <T> T getRandom(int size, Class<T> c, Random r) throws IllegalArgumentException, SecurityException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
String
parameter
(in which case the UTF-8 encoding is used for the bytes).T
- the type of the object to createsize
- the number of (random) bytes to createc
- the class of the object to create (needed due to type erasure)r
- the random number generator to useIllegalAccessException
- - if this Constructor object enforces Java language access
control and the underlying constructor is inaccessible.IllegalArgumentException
- - if the number of actual and formal parameters differ; if an
unwrapping conversion for primitive arguments fails; or if,
after possible unwrapping, a parameter value cannot be
converted to the corresponding formal parameter type by a
method invocation conversion; if this constructor pertains to
an enum type.InstantiationException
- - if the class that declares the underlying constructor
represents an abstract class.InvocationTargetException
- - if the underlying constructor throws an exception.ExceptionInInitializerError
- - if the initialization provoked by this method fails.NoSuchMethodException
- - if a matching method is not found.SecurityException
- - If a security manager, s, is present and any of the
following conditions is met: invocation of
s.checkMemberAccess(this, Member.PUBLIC) denies access to the
constructor the caller's class loader is not the same as or
an ancestor of the class loader for the current class and
invocation of s.checkPackageAccess() denies access to the
package of this class