Search in sources :

Example 6 with LogStopWatch

use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.

the class PointValueDaoMetrics method deleteAllPointData.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#deleteAllPointData()
	 */
@Override
public long deleteAllPointData() {
    LogStopWatch LogStopWatch = new LogStopWatch();
    long value = dao.deleteAllPointData();
    LogStopWatch.stop("deleteAllPointData()", this.metricsThreshold);
    return value;
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 7 with LogStopWatch

use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.

the class PointValueDaoMetrics method deletePointValuesBetween.

/*
     * (non-Javadoc)
     * @see com.serotonin.m2m2.db.dao.PointValueDao#deletePointValuesBetween(int, startTime, endTime)
     */
@Override
public long deletePointValuesBetween(int pointId, long startTime, long endTime) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    long value = dao.deletePointValuesBetween(pointId, startTime, endTime);
    LogStopWatch.stop("deletePointValuesBetween(pointId,startTime,endTime) (" + pointId + ", " + startTime + ", " + endTime + ")", this.metricsThreshold);
    return value;
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 8 with LogStopWatch

use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.

the class PointValueDaoMetrics method deletePointValuesBefore.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#deletePointValuesBefore(int, long)
	 */
@Override
public long deletePointValuesBefore(int pointId, long time) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    long value = dao.deletePointValuesBefore(pointId, time);
    LogStopWatch.stop("deletePointValuesBefore(pointId,time) (" + pointId + ", " + time + ")", this.metricsThreshold);
    return value;
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 9 with LogStopWatch

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, com.serotonin.db.MappedRowCallback)
	 */
@Override
public void getPointValuesBetween(List<Integer> pointIds, long from, long to, MappedRowCallback<IdPointValueTime> callback) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    dao.getPointValuesBetween(pointIds, from, to, callback);
    String sqlIn = "[";
    for (int i = 0; i < pointIds.size(); i++) {
        sqlIn += pointIds.get(i);
        if (i < pointIds.size())
            sqlIn += ",";
    }
    sqlIn += "]";
    LogStopWatch.stop("getPointValuesBetween(pointIds,from,to,callback) (" + sqlIn + ", " + from + ", " + to + ", " + callback.toString() + ")", this.metricsThreshold);
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 10 with LogStopWatch

use of com.serotonin.log.LogStopWatch in project ma-core-public by infiniteautomation.

the class PointValueDaoMetrics method deletePointValues.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#deletePointValues(int)
	 */
@Override
public long deletePointValues(int pointId) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    long value = dao.deletePointValues(pointId);
    LogStopWatch.stop("deletePointValues(pointId) (" + pointId + ")", this.metricsThreshold);
    return value;
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Aggregations

LogStopWatch (com.serotonin.log.LogStopWatch)45 IdPointValueTime (com.serotonin.m2m2.rt.dataImage.IdPointValueTime)9 PointValueTime (com.serotonin.m2m2.rt.dataImage.PointValueTime)9 ResultSet (java.sql.ResultSet)3 LogEvent (com.serotonin.m2m2.rt.console.LogEvent)2 IOException (java.io.IOException)2 PreparedStatement (java.sql.PreparedStatement)2 Simplify (com.goebl.simplify.Simplify)1 DataPointVOPointValueTimeBookend (com.infiniteautomation.mango.rest.v2.model.pointValue.DataPointVOPointValueTimeBookend)1 ModuleNotLoadedException (com.serotonin.ModuleNotLoadedException)1 ShouldNeverHappenException (com.serotonin.ShouldNeverHappenException)1 UserEventCache (com.serotonin.m2m2.rt.event.UserEventCache)1 LongPair (com.serotonin.m2m2.vo.pair.LongPair)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 Record (org.jooq.Record)1 Record1 (org.jooq.Record1)1 DataAccessException (org.springframework.dao.DataAccessException)1 RowMapper (org.springframework.jdbc.core.RowMapper)1