randoop.util
Class ReflectionExecutor
Object
ReflectionExecutor
public final class ReflectionExecutor
extends Object
Executes the code of a ReflectionCode object.
This class maintains an "executor" thread. Code is executed
on that thread. If the code takes longer than the specified
timeout, the thread is killed and a ReflectionExecutor.TimeoutExceeded
exception is reported.
Field Summary
static int |
timeout
After this many milliseconds, a non-returning method call, and its
associated test, are stopped forcefully. |
static boolean |
usethreads
Use if Randoop is exhibiting nonterminating behavior: this is usually
due to execution of code under test that results in an infinite
loop. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usethreads
public static boolean usethreads
- Use if Randoop is exhibiting nonterminating behavior: this is usually
due to execution of code under test that results in an infinite
loop. With this option, Randoop executes each test in a separate
thread and kills tests that take too long to finish. Tests killed in
this manner are not reported to the user. The downside is a BIG
(order-of-magnitude) decrease in generation speed.
timeout
public static int timeout
- After this many milliseconds, a non-returning method call, and its
associated test, are stopped forcefully.
Only meaningful if --usethreads is also specified.
ReflectionExecutor
public ReflectionExecutor()
normalExecs
public static int normalExecs()
excepExecs
public static int excepExecs()
normalExecAvgMillis
public static double normalExecAvgMillis()
excepExecAvgMillis
public static double excepExecAvgMillis()
executeReflectionCode
public static Throwable executeReflectionCode(ReflectionCode code,
PrintStream out)