public class TimeController extends Object
TODO: in the long run, this should replace all the occurrences of time handling in EvoSuite
| Modifier | Constructor and Description |
|---|---|
protected |
TimeController()
Main and only constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
calculateForHowLongClientWillRunInSeconds() |
static void |
execute(Runnable runnable,
String name,
long warn_time_ms)
Execute the given runnable synchronously, but issue a warning if it takes too long
|
static TimeController |
getInstance()
Get the singleton reference
|
double |
getPhasePercentage()
Calculate the percentage of progress in which we currently are in the phase.
|
static int |
getSearchBudgetInSeconds() |
boolean |
hasTimeToExecuteATestCase()
Is there time to execute a test case?
This not only depends on which phase we are in, but
also on how maximum long a test case can be left run
before trying to kill its threads if timeout.
|
boolean |
isThereStillTimeInThisPhase() |
boolean |
isThereStillTimeInThisPhase(long ms) |
static void |
resetSingleton() |
void |
updateState(ClientState newState) |
public static void resetSingleton()
public static void execute(Runnable runnable, String name, long warn_time_ms)
runnable - name - of the operation (will be used in the log)warn_time_ms - max time allowed for this operation before issuing a warningpublic static TimeController getInstance()
public void updateState(ClientState newState) throws IllegalArgumentException
IllegalArgumentExceptionpublic static int getSearchBudgetInSeconds()
public int calculateForHowLongClientWillRunInSeconds()
public boolean hasTimeToExecuteATestCase()
public boolean isThereStillTimeInThisPhase()
public boolean isThereStillTimeInThisPhase(long ms)
public double getPhasePercentage()
Copyright © 2010–2017 EvoSuite. All rights reserved.