public class ProgressDisplay
extends java.lang.Thread
| Modifier and Type | Class and Description |
|---|---|
static class |
ProgressDisplay.Mode |
| Modifier and Type | Field and Description |
|---|---|
private static int |
exit_if_no_steps_after_milliseconds
Give up after this many milliseconds, if the generator has not taken a step.
|
private AbstractGenerator |
generator
The test generator.
|
private long |
lastNumSteps
The step number of the most recent step.
|
private long |
lastStepTime
When the most recent step completed.
|
private ProgressDisplay.Mode |
outputMode
The output mode.
|
static java.lang.Object |
print_synchro
Global lock to prevent interleaving of progress display messages.
|
boolean |
shouldStop
Clients should set this variable instead of calling Thread.stop(), which is deprecated.
|
| Constructor and Description |
|---|
ProgressDisplay(AbstractGenerator generator,
ProgressDisplay.Mode outputMode)
Creates a new ProgressDisplay.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the display; good to do before printing to System.out.
|
void |
display(boolean withTime)
Displays the current status.
|
private void |
display(java.lang.String message)
Displays the given message.
|
private void |
exitDueToNoSteps()
Exit due to too much time without taking a step.
|
java.lang.String |
message(boolean withTime)
Return the progress message.
|
private boolean |
noProgressOutput()
Return true iff no progress output should be displayed.
|
private void |
printAllStackTraces() |
void |
run() |
private void |
updateLastStepTime()
Set
lastStepTime to when the most recent step completed. |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final java.lang.Object print_synchro
private static int exit_if_no_steps_after_milliseconds
private final ProgressDisplay.Mode outputMode
private AbstractGenerator generator
public boolean shouldStop
private long lastStepTime
private long lastNumSteps
public ProgressDisplay(AbstractGenerator generator, ProgressDisplay.Mode outputMode)
generator - the test generatoroutputMode - the output modepublic java.lang.String message(boolean withTime)
withTime - whether to include time and memory usagepublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadprivate void exitDueToNoSteps()
private void printAllStackTraces()
private void updateLastStepTime()
lastStepTime to when the most recent step completed.private boolean noProgressOutput()
public void clear()
public void display(boolean withTime)
withTime - whether to print time and memory usageprivate void display(java.lang.String message)
message - the message to display