use of com.tencent.wstt.gt.ui.model.TagTimeEntry in project GT by Tencent.
the class GTMemoryDaemonThread method doTask.
@Override
void doTask() {
int total = 0;
TagTimeEntry[] opPerfDatas = OpPerfBridge.getAllProfilerData();
for (TagTimeEntry tte : opPerfDatas) {
int single = 0;
if (tte.hasChild()) {
single = tte.getChildren()[0].getRecordSize();
// 总值计算时,复数要乘倍数
total += single * tte.getChildren().length;
} else {
single = tte.getRecordSize();
total += single;
}
validSingleLimit(single, tte);
}
if (// gw部分已经超一级警戒了,prof部分就不需要看了
!validTopLimit(total)) {
return;
}
if (GTTime.isEnable()) {
List<GroupTimeEntry> timeGroupList = GTTimeInternal.getAllGroup();
for (GroupTimeEntry gte : timeGroupList) {
for (TagTimeEntry tte : gte.entrys()) {
int single = tte.getRecordSize();
total += single;
}
}
}
if (// 先判断一级警戒,如果没有过一级警戒,才会判断二级警戒
!validTopLimit(total)) {
return;
}
if (// 先判断二级警戒,如果没有过二级警戒,才会判断三级警戒
!validSecendLimit(total)) {
return;
}
validThirdLimit(total);
}
use of com.tencent.wstt.gt.ui.model.TagTimeEntry in project GT by Tencent.
the class OpPerfBridge method startProfier.
public static void startProfier(OutPara outPara, int funcId, String desc, String unit) {
if (outPara == null) {
return;
}
outPara.hasMonitorOnce = true;
TagTimeEntry profilerEntry = opPerfManager.get(outPara.getKey());
if (null == profilerEntry) {
profilerEntry = new TagTimeEntry(null);
profilerEntry.setName(outPara.getKey());
profilerEntry.setAlias(outPara.getAlias());
profilerEntry.setFunctionId(funcId);
profilerEntry.setDesc(desc);
profilerEntry.setUnit(unit);
profilerEntry.setExkey(ClientManager.getInstance().getClientKey(outPara.getClient()));
opPerfManager.add(profilerEntry);
}
}
use of com.tencent.wstt.gt.ui.model.TagTimeEntry in project GT by Tencent.
the class OpPerfBridge method setThreshold.
public static void setThreshold(String key, ThresholdEntry threshold) {
TagTimeEntry profilerEntry = opPerfManager.get(key);
if (null == profilerEntry) {
return;
}
profilerEntry.setThresholdEntry(threshold);
}
use of com.tencent.wstt.gt.ui.model.TagTimeEntry in project GT by Tencent.
the class OpPerfBridge method startProfier.
/**
* 多维的启动性能统计,在UI上也需要展示多条曲线
* @param key
* @param funcId
*/
public static void startProfier(OutPara outPara, String[] subKeys, int[] funcIds, String desc, String unit) {
if (outPara == null) {
return;
}
outPara.hasMonitorOnce = true;
TagTimeEntry profilerEntry = opPerfManager.get(outPara.getKey());
if (null == profilerEntry) {
profilerEntry = new TagTimeEntry(null);
profilerEntry.setName(outPara.getKey());
profilerEntry.setAlias(outPara.getAlias());
profilerEntry.setFunctionId(funcIds[0]);
profilerEntry.setDesc(desc);
profilerEntry.setUnit(unit);
profilerEntry.setExkey(ClientManager.getInstance().getClientKey(outPara.getClient()));
profilerEntry.initChildren(subKeys.length);
int i = 0;
for (TagTimeEntry subEntry : profilerEntry.getSubTagEntrys()) {
subEntry.setName(subKeys[i]);
subEntry.setFunctionId(funcIds[i]);
i++;
}
opPerfManager.add(profilerEntry);
}
}
use of com.tencent.wstt.gt.ui.model.TagTimeEntry in project GT by Tencent.
the class OpPerfBridge method setOutparaChangedListener.
public static void setOutparaChangedListener(String smName, ChangedListener changedListener) {
TagTimeEntry tte = getProfilerData(smName);
tte.setChangedListener(changedListener);
}
Aggregations