本文整理汇总了Java中scouter.lang.ref.INT类的典型用法代码示例。如果您正苦于以下问题:Java INT类的具体用法?Java INT怎么用?Java INT使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
INT类属于scouter.lang.ref包,在下文中一共展示了INT类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getElapsedAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getElapsedAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.elapsed;
cnt.value += s.requestCount;
}
});
if (isClear) {
sum.value -= lastSlot.elapsed;
cnt.value -= lastSlot.requestCount;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例2: getSqlCountAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getSqlCountAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.sqlCount;
cnt.value += s.requestCount;
}
});
if (isClear) {
sum.value -= lastSlot.sqlCount;
cnt.value -= lastSlot.requestCount;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例3: getSqlTimeAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getSqlTimeAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.sqlTime;
cnt.value += s.requestCount;
}
});
if (isClear) {
sum.value -= lastSlot.sqlTime;
cnt.value -= lastSlot.requestCount;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例4: getRequestCount
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getRequestCount(boolean isClear) {
final INT sum = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.requestCount;
}
});
if (isClear) {
sum.value -= lastSlot.requestCount;
}
return sum.value;
}
示例5: getErrorCount
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getErrorCount(boolean isClear) {
final INT sum = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.errorCount;
}
});
if (isClear) {
sum.value -= lastSlot.errorCount;
}
return sum.value;
}
示例6: getNetTxAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
private int getNetTxAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.netTx;
cnt.value += s.count;
}
});
if (isClear) {
sum.value -= lastSlot.netTx;
cnt.value -= lastSlot.count;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例7: getNetRxAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
private int getNetRxAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.netRx;
cnt.value += s.count;
}
});
if (isClear) {
sum.value -= lastSlot.netRx;
cnt.value -= lastSlot.count;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例8: getDiskReadAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
private int getDiskReadAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.diskRead;
cnt.value += s.count;
}
});
if (isClear) {
sum.value -= lastSlot.diskRead;
cnt.value -= lastSlot.count;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例9: getDiskWriteAvg
import scouter.lang.ref.INT; //导入依赖的package包/类
private int getDiskWriteAvg(boolean isClear) {
final LONG sum = new LONG();
final INT cnt = new INT();
int period = isClear ? 301 : 300;
meter.search(period, new Handler<Slot>() {
public void process(Slot s) {
sum.value += s.diskWrite;
cnt.value += s.count;
}
});
if (isClear) {
sum.value -= lastSlot.diskWrite;
cnt.value -= lastSlot.count;
}
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例10: getElapsed90Pct
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getElapsed90Pct(int period) {
final LONG sum = new LONG();
final INT cnt = new INT();
meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
int total = (int) (b.count * 0.9);
if (total == 0)
return;
for (int timeInx = 0; timeInx < PCT_BUCKET; timeInx++) {
if (total >= b.pct90[timeInx]) {
total -= b.pct90[timeInx];
} else {
sum.value += timeInx * PCT_UNIT_TIME;
cnt.value++;
return;
}
}
sum.value += PCT_MAX_TIME;
cnt.value++;
}
});
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例11: getTPS
import scouter.lang.ref.INT; //导入依赖的package包/类
public float getTPS(int period) {
final INT sum = new INT();
period = meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
sum.value += b.count;
}
});
return (float) ((double) sum.value / period);
}
示例12: getElapsedTime
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getElapsedTime(int period) {
final LONG sum = new LONG();
final INT cnt = new INT();
meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
sum.value += b.elapsedTime;
cnt.value += b.count;
}
});
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例13: getSqlTime
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getSqlTime(int period) {
final LONG sum = new LONG();
final INT cnt = new INT();
meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
sum.value += b.sqlTimeByService;
cnt.value += b.count;
}
});
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例14: getApiTime
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getApiTime(int period) {
final LONG sum = new LONG();
final INT cnt = new INT();
meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
sum.value += b.apiTmeByService;
cnt.value += b.count;
}
});
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}
示例15: getQueuingTime
import scouter.lang.ref.INT; //导入依赖的package包/类
public int getQueuingTime(int period) {
final LONG sum = new LONG();
final INT cnt = new INT();
meter.search(period, new Handler<MeterService.Bucket>() {
public void process(Bucket b) {
sum.value += b.queuingTime;
cnt.value += b.count;
}
});
return (int) ((cnt.value == 0) ? 0 : sum.value / cnt.value);
}