public double getTransactionTime() { if (isCollected()) { return ((double) ((endTime.longValue() - startTime.longValue()) * SECOND_MULTIPLIER)) / (double) ticks; } else { throw new IllegalStateException("EtmPoint not collected yet."); } }
public final void visitPostCollect(MeasurementPoint measurementPoint) { if (!collecting || !started) { return; } if (measurementPoint == null || measurementPoint.isCollected()) { return; } try { measurementPoint.setEndTime(timer.getCurrentTime()); doVisitPostCollect(measurementPoint); aggregator.add(measurementPoint); // catch all exceptions here // in order to avoid negative side effects for // our business logic } catch (Exception e) { LOG.warn("Caught exception within measurement code.", e); } }