Class ThreadSpeedTest.EvaluationThread
- java.lang.Object
-
- java.lang.Thread
-
- com.singularsys.jepexamples.diagnostics.ThreadSpeedTest.EvaluationThread
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- ThreadSpeedTest
public static class ThreadSpeedTest.EvaluationThread extends java.lang.Thread
A thread which evaluates an expression multiple times. This version uses LightWeightComponentSet and SerializableExpression.- See Also:
SerializableExpression
,LightWeightComponentSet
-
-
Constructor Summary
Constructors Constructor Description EvaluationThread(int index, Jep baseJep, Node baseExpression, java.lang.String varName, double minValue, double maxValue, int numItts)
Construct a thread.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Evaluates the expression numItts times.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Constructor Detail
-
EvaluationThread
public EvaluationThread(int index, Jep baseJep, Node baseExpression, java.lang.String varName, double minValue, double maxValue, int numItts) throws JepException
Construct a thread. Usesnew Jep(new LightWeightComponentSet(baseJep))
to create a local Jep instance and(new ImportationVisitor(localJep)).deepCopy(baseExpression)
to create a local copy of the expression.- Parameters:
index
- the number of this threadbaseJep
- the base Jep instancebaseExpression
- the expressionvarName
- name of the variableminValue
- minimum value for variablemaxValue
- maximum value for variablenumItts
- number of iterations- Throws:
JepException
-
-