use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.
the class BaseSqlQuery method immediateCount.
/**
* Execute the Count if there is one
*/
public long immediateCount() {
if (countSql == null)
return 0;
LogStopWatch stopWatch = null;
if (this.useMetrics)
stopWatch = new LogStopWatch();
long count = this.dao.queryForObject(countSql, countArgs.toArray(), Long.class, new Long(0));
if (this.useMetrics)
stopWatch.stop("Count: " + countSql + " \nArgs: " + countArgs.toString(), this.metricsThreshold);
return count;
}
use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.
the class PointValueDaoMetrics method getPointValuesBetween.
/* (non-Javadoc)
* @see com.serotonin.m2m2.db.dao.PointValueDao#getPointValuesBetween(java.util.List, long, long, boolean, java.lang.Integer, com.infiniteautomation.mango.db.query.PVTQueryCallback)
*/
@Override
public void getPointValuesBetween(List<Integer> ids, long from, long to, boolean orderById, Integer limit, PVTQueryCallback<IdPointValueTime> callback) {
LogStopWatch logStopWatch = new LogStopWatch();
dao.getPointValuesBetween(ids, from, to, orderById, limit, callback);
logStopWatch.stop("getPointValuesBetween(dataPointIds, from, to, orderById, limit, callback) + (" + ids + ", " + to + ", " + from + ", " + limit + "callback)", this.metricsThreshold);
}
use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.
the class PointValueDaoMetrics method wideQuery.
/* (non-Javadoc)
* @see com.serotonin.m2m2.db.dao.PointValueDao#wideQuery(int, long, long, com.serotonin.db.WideQueryCallback)
*/
@Override
public void wideQuery(int pointId, long from, long to, WideQueryCallback<PointValueTime> callback) {
LogStopWatch LogStopWatch = new LogStopWatch();
dao.wideQuery(pointId, from, to, callback);
LogStopWatch.stop("wideQuery(pointId,from,to,callback) (" + pointId + ", " + from + ", " + to + ", " + callback.toString() + ")", this.metricsThreshold);
}
use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.
the class PointValueDaoMetrics method getInceptionDate.
/* (non-Javadoc)
* @see com.serotonin.m2m2.db.dao.PointValueDao#getInceptionDate(int)
*/
@Override
public long getInceptionDate(int pointId) {
LogStopWatch LogStopWatch = new LogStopWatch();
long value = dao.getInceptionDate(pointId);
LogStopWatch.stop("getInceptionDate(pointId) (" + pointId + ")", this.metricsThreshold);
return value;
}
use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.
the class PointValueDaoMetrics method deletePointValue.
/* (non-Javadoc)
* @see com.serotonin.m2m2.db.dao.PointValueDao#deletePointValue(int)
*/
@Override
public long deletePointValue(int dataPointId, long ts) {
LogStopWatch LogStopWatch = new LogStopWatch();
long value = dao.deletePointValue(dataPointId, ts);
LogStopWatch.stop("deletePointValue(dataPointId, ts) + (" + dataPointId + ", " + ts + ")", this.metricsThreshold);
return value;
}
Aggregations