use of com.actiontech.dble.btrace.provider.CostTimeProvider in project dble by actiontech.
the class NonBlockingSession method setRequestTime.
public void setRequestTime() {
if (DbleServer.getInstance().getConfig().getSystem().getCostTimeStat() == 0) {
return;
}
timeCost = false;
if (ThreadLocalRandom.current().nextInt(100) >= DbleServer.getInstance().getConfig().getSystem().getCostSamplePercent()) {
return;
}
timeCost = true;
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("clear");
}
queryTimeCost = new QueryTimeCost();
provider = new CostTimeProvider();
provider.beginRequest(source.getId());
long requestTime = System.nanoTime();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("frontend connection setRequestTime:" + requestTime);
}
queryTimeCost.setRequestTime(requestTime);
}
Aggregations