Search in sources :

Example 31 with LogStopWatch

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

the class PointValueDaoMetrics method getLatestPointValues.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getLatestPointValues(int, int, long)
	 */
@Override
public List<PointValueTime> getLatestPointValues(int pointId, int limit, long before) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    List<PointValueTime> values = dao.getLatestPointValues(pointId, limit, before);
    LogStopWatch.stop("getLatestPointValues(pointId,limit,before) (" + pointId + ", " + limit + ", " + before + "){" + values.size() + "}", this.metricsThreshold);
    return values;
}
Also used : PointValueTime(com.serotonin.m2m2.rt.dataImage.PointValueTime) IdPointValueTime(com.serotonin.m2m2.rt.dataImage.IdPointValueTime) LogStopWatch(com.serotonin.log.LogStopWatch)

Example 32 with LogStopWatch

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

the class PointValueDaoMetrics method getStartTime.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getStartTime(java.util.List)
	 */
@Override
public long getStartTime(List<Integer> pointIds) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    long result = dao.getStartTime(pointIds);
    String sqlIn = "[";
    for (int i = 0; i < pointIds.size(); i++) {
        sqlIn += pointIds.get(i);
        if (i < pointIds.size())
            sqlIn += ",";
    }
    sqlIn += "]";
    LogStopWatch.stop("getStartTime(pointIds) (" + sqlIn + ")", this.metricsThreshold);
    return result;
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 33 with LogStopWatch

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

the class PointValueDaoMetrics method deleteAllPointDataWithoutCount.

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

Example 34 with LogStopWatch

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

the class PointValueDaoMetrics method updatePointValueAsync.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#updatePointValueAsync(int, com.serotonin.m2m2.rt.dataImage.PointValueIdTime, com.serotonin.m2m2.rt.dataImage.SetPointSource)
	 */
@Override
public void updatePointValueAsync(int id, PointValueTime pvt, SetPointSource source) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    dao.updatePointValueAsync(id, pvt, source);
    LogStopWatch.stop("updatePointValueAsync(id, ts, source) (" + id + ", pvt)", this.metricsThreshold);
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 35 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(int, long, long, com.serotonin.db.MappedRowCallback)
	 */
@Override
public void getPointValuesBetween(int pointId, long from, long to, MappedRowCallback<PointValueTime> callback) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    dao.getPointValuesBetween(pointId, from, to, callback);
    LogStopWatch.stop("getPointValuesBetween(pointId,from,to,callback) + (" + pointId + ", " + from + ", " + to + ", " + callback.toString() + ")", this.metricsThreshold);
}
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