Search in sources :

Example 36 with LogStopWatch

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

the class PointValueDaoMetrics method updatePointValueSync.

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

Example 37 with LogStopWatch

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

the class PointValueDaoMetrics method getLatestPointValue.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getLatestPointValue(int)
	 */
@Override
public PointValueTime getLatestPointValue(int pointId) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    PointValueTime value = dao.getLatestPointValue(pointId);
    LogStopWatch.stop("getLatestPointValue(pointId) (" + pointId + "){" + (value != null ? 1 : 0) + "}", this.metricsThreshold);
    return value;
}
Also used : PointValueTime(com.serotonin.m2m2.rt.dataImage.PointValueTime) IdPointValueTime(com.serotonin.m2m2.rt.dataImage.IdPointValueTime) LogStopWatch(com.serotonin.log.LogStopWatch)

Example 38 with LogStopWatch

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

the class PointValueDaoMetrics method deletePointValuesBeforeWithoutCount.

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

Example 39 with LogStopWatch

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

the class PointValueDaoMetrics method getPointValueAfter.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getPointValueAfter(int, long)
	 */
@Override
public PointValueTime getPointValueAfter(int pointId, long time) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    PointValueTime value = dao.getPointValueAfter(pointId, time);
    LogStopWatch.stop("getPointValueAfter(pointId,time) (" + pointId + ", " + time + "){" + (value != null ? 1 : 0) + "}", this.metricsThreshold);
    return value;
}
Also used : PointValueTime(com.serotonin.m2m2.rt.dataImage.PointValueTime) IdPointValueTime(com.serotonin.m2m2.rt.dataImage.IdPointValueTime) LogStopWatch(com.serotonin.log.LogStopWatch)

Example 40 with LogStopWatch

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

the class PointValueDaoMetrics method getEndTime.

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