Class MetricProfile
java.lang.Object
org.tasktide.core.model.job_env.metrics.MetricProfile
- All Implemented Interfaces:
TaskTideModel<MetricProfile>
Holds
ProfileData and computes mean across its
observed MetricData datapoints as its own Entity.-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorMetricProfile(String id, String label, long timestamp, String units, float meanTotal, float meanAvailable, float meanUsed, ProfileData profile, MetricType type, String jobEnvId, CustomAnnotation anno) Construct with data -
Method Summary
Modifier and TypeMethodDescriptionGet annotationsReturnMetricTypegetId()Get profile IdGetJobEnvironmentIdgetLabel()Get profile labelfloatGet mean availablefloatGet mean totalfloatGet mean usedGetMetricTypeGet profiled datagetState()Get units as statelongGet profile timestampgetUnits()Get units for profilegetValueFromField(String field) Get value of queried fieldvoidReset model to emptyvoidSet annotation providedvoidsetJobEnvId(String jobEnvId) SetJobEnvironmentIdvoidSet profile labelvoidsetMeanAvailable(float meanAvailable) Set mean availablevoidsetMeanTotal(float meanTotal) Set mean totalvoidsetMeanUsed(float meanUsed) Set mean usedvoidsetMetricType(MetricType metricType) SetsMetricTypevoidsetProfile(ProfileData profile) Set profile datavoidsetTimestamp(long timestamp) Set time stampvoidSet unitstoJson()Represent as JSON-B stringRepresent as JSON-B DocumenttoString()Represent as string
-
Constructor Details
-
MetricProfile
public MetricProfile()Empty constructor -
MetricProfile
public MetricProfile(String id, String label, long timestamp, String units, float meanTotal, float meanAvailable, float meanUsed, ProfileData profile, MetricType type, String jobEnvId, CustomAnnotation anno) Construct with data- Parameters:
id-label-timestamp-units-meanTotal-meanAvailable-meanUsed-profile-type-jobEnvId-anno-
-
-
Method Details
-
getAnnotations
Get annotations- Specified by:
getAnnotationsin interfaceTaskTideModel<MetricProfile>- Returns:
CustomAnnotation
-
setAnnotations
Set annotation provided- Specified by:
setAnnotationsin interfaceTaskTideModel<MetricProfile>- Parameters:
anno-
-
toJson
Represent as JSON-B string- Specified by:
toJsonin interfaceTaskTideModel<MetricProfile>- Returns:
- String
-
toJsonDoc
Represent as JSON-B Document- Specified by:
toJsonDocin interfaceTaskTideModel<MetricProfile>- Returns:
- String
-
getId
Get profile Id- Specified by:
getIdin interfaceTaskTideModel<MetricProfile>- Returns:
- String
-
getState
Get units as state- Specified by:
getStatein interfaceTaskTideModel<MetricProfile>- Returns:
-
getCollection
ReturnMetricType- Specified by:
getCollectionin interfaceTaskTideModel<MetricProfile>- Returns:
- String
-
resetModel
public void resetModel()Reset model to empty- Specified by:
resetModelin interfaceTaskTideModel<MetricProfile>
-
getJobEnvId
-
setJobEnvId
-
getLabel
-
setLabel
-
getTimestamp
public long getTimestamp()Get profile timestamp- Returns:
- long
-
setTimestamp
public void setTimestamp(long timestamp) Set time stamp- Parameters:
timestamp-
-
getMeanTotal
public float getMeanTotal()Get mean total- Returns:
- float
-
setMeanTotal
public void setMeanTotal(float meanTotal) Set mean total- Parameters:
meanTotal-
-
getMeanAvailable
public float getMeanAvailable()Get mean available- Returns:
- float
-
setMeanAvailable
public void setMeanAvailable(float meanAvailable) Set mean available- Parameters:
meanAvailable-
-
getMeanUsed
public float getMeanUsed()Get mean used- Returns:
- float
-
setMeanUsed
public void setMeanUsed(float meanUsed) Set mean used- Parameters:
meanUsed-
-
getProfile
-
setProfile
-
getMetricType
-
setMetricType
-
getUnits
-
setUnits
-
toString
-
getValueFromField
Get value of queried field- Specified by:
getValueFromFieldin interfaceTaskTideModel<MetricProfile>- Parameters:
field-- Returns:
- Object
-