Search in sources :

Example 41 with LogStopWatch

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

the class PointValueDaoMetrics method getPointValues.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getPointValues(int, long)
	 */
@Override
public List<PointValueTime> getPointValues(int pointId, long since) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    List<PointValueTime> values = dao.getPointValues(pointId, since);
    LogStopWatch.stop("getPointValues(pointId,since) (" + pointId + ", " + since + "){" + 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 42 with LogStopWatch

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

the class PointValueDaoMetrics method getFiledataIds.

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

Example 43 with LogStopWatch

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

the class PointValueDaoMetrics method wideBookendQuery.

/* (non-Javadoc)
     * @see com.serotonin.m2m2.db.dao.PointValueDao#wideBookendQuery(java.util.List, long, long, java.lang.Integer, com.serotonin.db.WideQueryCallback)
     */
@Override
public void wideBookendQuery(List<Integer> pointIds, long from, long to, boolean orderById, Integer limit, BookendQueryCallback<IdPointValueTime> callback) {
    LogStopWatch logStopWatch = new LogStopWatch();
    dao.wideBookendQuery(pointIds, from, to, orderById, limit, callback);
    logStopWatch.stop("wideBookendQuery(dataPointIds, from, to, orderById, limit, callback) + (" + pointIds + ", " + to + ", " + from + ", " + limit + "callback)", this.metricsThreshold);
}
Also used : LogStopWatch(com.serotonin.log.LogStopWatch)

Example 44 with LogStopWatch

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

the class PointValueDaoMetrics method deletePointValuesWithoutCount.

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

Example 45 with LogStopWatch

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

the class PointValueDaoMetrics method getPointValueBefore.

/* (non-Javadoc)
	 * @see com.serotonin.m2m2.db.dao.PointValueDao#getPointValueBefore(int, long)
	 */
@Override
public PointValueTime getPointValueBefore(int pointId, long time) {
    LogStopWatch LogStopWatch = new LogStopWatch();
    PointValueTime value = dao.getPointValueBefore(pointId, time);
    LogStopWatch.stop("getPointValuesBefore(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)

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