Package edu.isi.pegasus.planner.classes
Class WorkflowMetrics
- java.lang.Object
-
- edu.isi.pegasus.planner.classes.Data
-
- edu.isi.pegasus.planner.classes.WorkflowMetrics
-
- All Implemented Interfaces:
java.lang.Cloneable
public class WorkflowMetrics extends Data implements java.lang.Cloneable
A Workflow metrics class that stores the metrics about the workflow.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringmDAXLabelThe label of the dax.private booleanmLockTaskMetricsA boolean indicating whether to update task metricsprivate intmNumChmodJobsprivate intmNumCleanupJobsThe number of cleanup jobs.private intmNumClusteredJobsThe number of clustered compute jobs.private intmNumComputeJobsThe number of compute jobs.private intmNumComputeTasksThe number of compute tasks in the DAXprivate intmNumCreateDirJobsThe number of create dir jobs.private intmNumDAGJobsThe number of DAG jobs in the workflowprivate intmNumDAGTasksThe number of DAG tasks in the DAX.private intmNumDAXJobsThe number of dax jobs in the workflowprivate intmNumDAXTasksThe number of DAX tasks in the DAXprivate intmNumInterTxJobsThe number of inter-site transfer jobs.private intmNumRegJobsThe number of registration jobs.private intmNumSITxJobsThe number of stage in transfer jobs.private intmNumSOTxJobsThe number of stage-out transfer jobs.private intmNumTotalJobsThe total number of jobs in the executable workflow.private intmNumTotalTasksThe total number of tasks in the executable workflow.
-
Constructor Summary
Constructors Constructor Description WorkflowMetrics()The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappend(java.lang.StringBuffer buffer, java.lang.String key, int value)Appends a key=value pair to the StringBuffer.protected voidappend(java.lang.StringBuffer buffer, java.lang.String key, java.lang.String value)Appends a key=value pair to the StringBuffer.java.lang.Objectclone()Returns the clone of the object.voiddecrement(Job job)Decrement the metrics when on the basis of type of job being removedprivate voiddecrementJobMetrics(Job job)Decrement the metrics when on the basis of type of job.private voiddecrementTaskMetrics(Job job)Decrement the task metrics when on the basis of type of job.java.lang.StringgetLabel()Returns the DAXlabel.voidincrement(Job job)Increment the metrics when on the basis of type of job.private voidincrementJobMetrics(Job job)Increment the metrics when on the basis of type of job.private voidincrementTaskMetrics(Job job)Increment the metrics when on the basis of type of job.voidlockTaskMetrics(boolean lock)Sets the lock task metrics parameters.voidreset(boolean resetTaskMetrics)Resets the internal counters to zero.voidsetLabel(java.lang.String label)Sets the DAXlabel.java.lang.StringtoJson()Converts the planner metrics to JSONjava.lang.StringtoPrettyJson()Converts the planner metrics to JSONjava.lang.StringtoString()Returns a textual description of the object.-
Methods inherited from class edu.isi.pegasus.planner.classes.Data
setToString, vectorToString
-
-
-
-
Field Detail
-
mNumComputeTasks
@SerializedName("compute_tasks") @Expose private int mNumComputeTasksThe number of compute tasks in the DAX
-
mNumDAXTasks
@SerializedName("dax_tasks") @Expose private int mNumDAXTasksThe number of DAX tasks in the DAX
-
mNumDAGTasks
@SerializedName("dag_tasks") @Expose private int mNumDAGTasksThe number of DAG tasks in the DAX.
-
mNumTotalTasks
@SerializedName("total_tasks") @Expose private int mNumTotalTasksThe total number of tasks in the executable workflow.
-
mNumComputeJobs
@SerializedName("compute_jobs") @Expose private int mNumComputeJobsThe number of compute jobs.
-
mNumClusteredJobs
@SerializedName("clustered_jobs") @Expose private int mNumClusteredJobsThe number of clustered compute jobs.
-
mNumSITxJobs
@SerializedName("si_tx_jobs") @Expose private int mNumSITxJobsThe number of stage in transfer jobs.
-
mNumSOTxJobs
@SerializedName("so_tx_jobs") @Expose private int mNumSOTxJobsThe number of stage-out transfer jobs.
-
mNumInterTxJobs
@SerializedName("inter_tx_jobs") @Expose private int mNumInterTxJobsThe number of inter-site transfer jobs.
-
mNumRegJobs
@SerializedName("reg_jobs") @Expose private int mNumRegJobsThe number of registration jobs.
-
mNumCleanupJobs
@SerializedName("cleanup_jobs") @Expose private int mNumCleanupJobsThe number of cleanup jobs.
-
mNumCreateDirJobs
@SerializedName("create_dir_jobs") @Expose private int mNumCreateDirJobsThe number of create dir jobs.
-
mNumDAXJobs
@SerializedName("dax_jobs") @Expose private int mNumDAXJobsThe number of dax jobs in the workflow
-
mNumDAGJobs
@SerializedName("dag_jobs") @Expose private int mNumDAGJobsThe number of DAG jobs in the workflow
-
mNumChmodJobs
@SerializedName("chmod_jobs") @Expose private int mNumChmodJobs
-
mNumTotalJobs
@SerializedName("total_jobs") @Expose private int mNumTotalJobsThe total number of jobs in the executable workflow.
-
mDAXLabel
private java.lang.String mDAXLabel
The label of the dax.
-
mLockTaskMetrics
private transient boolean mLockTaskMetrics
A boolean indicating whether to update task metrics
-
-
Method Detail
-
reset
public final void reset(boolean resetTaskMetrics)
Resets the internal counters to zero.- Parameters:
resetTaskMetrics- whether to reset task metrics or not
-
setLabel
public void setLabel(java.lang.String label)
Sets the DAXlabel.- Parameters:
label- the dax label
-
getLabel
public java.lang.String getLabel()
Returns the DAXlabel.- Returns:
- the dax label
-
lockTaskMetrics
public void lockTaskMetrics(boolean lock)
Sets the lock task metrics parameters. If the lock is set, the task metrics are no longer updated on subsequent calls to increment / decrement.- Parameters:
lock- the boolean parameter
-
increment
public void increment(Job job)
Increment the metrics when on the basis of type of job.- Parameters:
job- the job being added.
-
incrementTaskMetrics
private void incrementTaskMetrics(Job job)
Increment the metrics when on the basis of type of job.- Parameters:
job- the job being added.
-
incrementJobMetrics
private void incrementJobMetrics(Job job)
Increment the metrics when on the basis of type of job.- Parameters:
job- the job being added.
-
decrement
public void decrement(Job job)
Decrement the metrics when on the basis of type of job being removed- Parameters:
job- the job being added.
-
decrementJobMetrics
private void decrementJobMetrics(Job job)
Decrement the metrics when on the basis of type of job. Does not decrement the task related metrics.- Parameters:
job- the job being removed.
-
decrementTaskMetrics
private void decrementTaskMetrics(Job job)
Decrement the task metrics when on the basis of type of job.- Parameters:
job- the job being removed.
-
toString
public java.lang.String toString()
Returns a textual description of the object.
-
append
protected void append(java.lang.StringBuffer buffer, java.lang.String key, java.lang.String value)Appends a key=value pair to the StringBuffer.- Parameters:
buffer- the StringBuffer that is to be appended to.key- the key.value- the value.
-
append
protected void append(java.lang.StringBuffer buffer, java.lang.String key, int value)Appends a key=value pair to the StringBuffer.- Parameters:
buffer- the StringBuffer that is to be appended to.key- the key.value- the value.
-
toJson
public java.lang.String toJson()
Converts the planner metrics to JSON- Returns:
- the planner metrics in JSON
-
toPrettyJson
public java.lang.String toPrettyJson()
Converts the planner metrics to JSON- Returns:
- the planner metrics in JSON
-
clone
public java.lang.Object clone()
Returns the clone of the object.- Overrides:
clonein classjava.lang.Object- Returns:
- the clone
-
-