public class EstimatedRuntime
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
EstimatedRuntime(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element runtime) |
Modifier and Type | Method and Description |
---|---|
int |
getCurrentERT()
Returns the current estimated runtime.
|
int |
getFixedValue()
Returns the fixed value in seconds.
|
int |
getIgnoreDiffMinRuns()
Returns the number of past runs, which should be taken into account despite deviations.
|
int |
getIgnoreDiffPercent()
Returns the number of past runs, which should be taken into account despite deviations.
|
int |
getLastRuns()
Returns the number of past runs which are taken into account when calculating the ERT.
|
int |
getLastRunsPercent()
Returns the value in percent for an upward correction or the ERT.
|
void |
ignoreDifferences(int percent,
int minRuns)
Possible large deviations to be repressed for the estimated runtime.
|
protected boolean |
isDirty() |
boolean |
isDynamicMethodAdaptive()
Returns
true if the adaptive method is used. |
boolean |
isDynamicMethodAverage()
Returns
true if the Average method is used. |
boolean |
isDynamicMethodLinear()
Returns
true if the Linear regression method should be used. |
boolean |
isDynamicMethodMaxValue()
Returns
true if the Maximum method is used. |
boolean |
isIgnoreDifference()
Returns
true if differences should be ignored. |
boolean |
isMethodDefault()
Returns
true if "UC_CLIENT_SETTINGS" should be used. |
boolean |
isMethodDynamic()
Returns
true if a dynamic method is used to calculate the estimated runtime. |
boolean |
isMethodFixedValue()
Returns
true if a fixed value is selected for the estimated runtime. |
void |
setCurrentERT(int currentERT)
Sets the current estimated runtime.
|
void |
setDynamicMethodAdaptive()
Selects the adaptive method.
|
void |
setDynamicMethodAverage()
Selects the Average method.
|
void |
setDynamicMethodLinear()
Selects linear regression method.
|
void |
setDynamicMethodMaxValue()
Selects the maximum method.
|
void |
setIgnoreDifference(boolean value)
If
value is set to true the method ignoreDifferences
can be used to ignore differences. |
void |
setLastRuns(int runs)
Sets the number of past runs which are taken into account when calculating the ERT.
|
void |
setLastRunsPercent(int percent)
Sets the value in percent for an upward correction or the ERT.
|
void |
setMethodDefault()
Selects default (UC_CLIENT_SETTING).
|
void |
setMethodDynamic()
Selects dynamic Method: Average, linear regression, maximal value.
|
void |
setMethodFixedValue(int seconds)
Sets a fixed value for the estimated runtime.
|
protected void |
store(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element runtime) |
protected EstimatedRuntime(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element runtime)
public boolean isDynamicMethodLinear()
true
if the Linear regression method should be used.
With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.
public void setDynamicMethodLinear()
With this method, the increase or decrease of runtimes is emphasized. As with the average method, the number of runs and the specification of a correction factor may be specified in percent.
public boolean isDynamicMethodAverage()
true
if the Average method is used.
The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.
public void setDynamicMethodAverage()
The average value from the real runtimes is determined. The number of previous runs may be specified for calculating the average. Furthermore, a correction factor in percent may be set. This will be added to the calculated average value.
public boolean isDynamicMethodAdaptive()
true
if the adaptive method is used.public void setDynamicMethodAdaptive()
public boolean isDynamicMethodMaxValue()
true
if the Maximum method is used.
The longest saved value from the list of real runtimes is taken as the estimated runtime.
public void setDynamicMethodMaxValue()
The longest saved value from the list of real runtimes is taken as the estimated runtime.
public boolean isMethodDefault()
true
if "UC_CLIENT_SETTINGS" should be used.
The client's settings in the Variable "UC_CLIENT_SETTINGS" are used for calculating the estimated runtime. If there are no settings, or only invalid ones, the default settings which apply to all clients are used.
public boolean isMethodFixedValue()
true
if a fixed value is selected for the estimated runtime.public boolean isMethodDynamic()
true
if a dynamic method is used to calculate the estimated runtime.public void setMethodDynamic()
public int getCurrentERT()
public void setCurrentERT(int currentERT)
currentERT
- Runtime in secondspublic void setMethodDefault()
public void setMethodFixedValue(int seconds)
seconds
- Secondspublic int getFixedValue()
public void setLastRuns(int runs)
runs
- Number of runspublic int getLastRuns()
public void setLastRunsPercent(int percent)
percent
- Percentpublic int getLastRunsPercent()
public void ignoreDifferences(int percent, int minRuns)
percent
- Upper limit in percent, which the real runtime uses to calculate the estimated runtimeminRuns
- Number of past runs, which should be taken into account despite deviations.
Permitted value: 0 to 25.public void setIgnoreDifference(boolean value)
value
is set to true
the method ignoreDifferences
can be used to ignore differences. If set to false
the value which are set
in ignoreDifferences
are ignored.value
- Boolean value indicating if differences should be ignoredpublic boolean isIgnoreDifference()
true
if differences should be ignored.public int getIgnoreDiffMinRuns()
public int getIgnoreDiffPercent()
protected boolean isDirty()