
com.yomahub.liteflow.monitor.CompStatistics Maven / Gradle / Ivy
The newest version!
/**
* Title: liteflow
* Description: 轻量级的组件式流程框架
* @author Bryan.Zhang
* @email [email protected]
* @Date 2020/4/1
*/
package com.yomahub.liteflow.monitor;
/**
* 统计类
*
* @author Bryan.Zhang
*/
public class CompStatistics implements Comparable {
private String componentClazzName;
private long timeSpent;
private long memorySpent;
private long recordTime;
public CompStatistics(String componentClazzName, long timeSpent) {
this.componentClazzName = componentClazzName;
this.timeSpent = timeSpent;
this.recordTime = System.currentTimeMillis();
}
public String getComponentClazzName() {
return componentClazzName;
}
public void setComponentClazzName(String componentClazzName) {
this.componentClazzName = componentClazzName;
}
public long getTimeSpent() {
return timeSpent;
}
public void setTimeSpent(long timeSpent) {
this.timeSpent = timeSpent;
}
public long getMemorySpent() {
return memorySpent;
}
public void setMemorySpent(long memorySpent) {
this.memorySpent = memorySpent;
}
public long getRecordTime() {
return recordTime;
}
@Override
public int compareTo(CompStatistics o) {
if (o != null) {
return this.recordTime >= o.getRecordTime() ? -1 : 1;
}
return 1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy