public class ThreadCalculateMetrics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
CALC_TYPE_INTEGRAL_DELTA
Calculation is based on integral of delta system times.
|
java.lang.String |
CALC_TYPE_INTEGRAL_TOTAL
Calculation is based on average system times.
|
java.lang.String |
CALC_TYPE_LAST_TOTAL
Calculation is based on the last value for CPU system times.
|
static double |
FACTOR_MAX_MACHINE_LOAD
The factor max machine load.
|
java.lang.String |
METRIC_BASE_CLASS
The metric calculation based on class data.
|
java.lang.String |
METRIC_BASE_INDIVIDUAL
The metric calculation based on individual data.
|
Constructor and Description |
---|
ThreadCalculateMetrics()
Instantiates a new thread measure metrics.
|
ThreadCalculateMetrics(ThreadInfoStorage threadInfoStorage,
java.lang.String calcType,
java.lang.String metricBase)
Instantiates a new thread measure metrics.
|
Modifier and Type | Method and Description |
---|---|
double |
getAverageCPUPercentage(ThreadInfoStorageMachine machine)
Gets the average CPU percentage.
|
java.lang.String |
getCalcType()
Gets the calculation type.
|
java.lang.String |
getMetricBase()
Gets the method on which the calculation of metric is based.
|
void |
getMetrics()
Calculates the metrics for all agents.
|
double |
getSimulationDurationMilliSeconds()
Gets the simulation duration in milliseconds.
|
void |
setCalcType(java.lang.String calcType)
Sets the calculation type.
|
void |
setMetricBase(java.lang.String metricBase)
Sets the the method on which the calculation of metric is based.
|
public static final double FACTOR_MAX_MACHINE_LOAD
public final java.lang.String CALC_TYPE_INTEGRAL_DELTA
public final java.lang.String CALC_TYPE_INTEGRAL_TOTAL
public final java.lang.String CALC_TYPE_LAST_TOTAL
public final java.lang.String METRIC_BASE_INDIVIDUAL
public final java.lang.String METRIC_BASE_CLASS
public ThreadCalculateMetrics()
public ThreadCalculateMetrics(ThreadInfoStorage threadInfoStorage, java.lang.String calcType, java.lang.String metricBase)
threadInfoStorage
- the thread info storagecalcType
- the calculation typemetricBase
- the metric basepublic void getMetrics()
public double getAverageCPUPercentage(ThreadInfoStorageMachine machine)
machine
- the machinepublic java.lang.String getCalcType()
public void setCalcType(java.lang.String calcType)
calcType
- the new calc typepublic java.lang.String getMetricBase()
public void setMetricBase(java.lang.String metricBase)
metricBase
- the new metric basepublic double getSimulationDurationMilliSeconds()