public EtmPoint createPoint(String symbolicName) { return new MeasurementPoint(this, symbolicName); }
public boolean isCollectable() { // We always assume that parent is master. // if the root parent is collectable, everything else should be collectable too. if (parent != null) { return parent.isCollectable(); } return endTime != null; }
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 visitPreMeasurement(MeasurementPoint measurementPoint) { try { if (!collecting) { return; } if (!started) { if (!noStartedErrorMessageFlag) { showMonitorNotStartedMessage(); } return; } if (measurementPoint == null) { return; } doVisitPreMeasurement(measurementPoint); measurementPoint.setTicks(timer.getTicksPerSecond()); measurementPoint.setStartTime(timer.getCurrentTime()); // 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); } }
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); } }
protected void doVisitPreMeasurement(MeasurementPoint measurementPoint) { MeasurementPoint point = (MeasurementPoint) currentParent.get(); currentParent.set(measurementPoint); measurementPoint.setParent(point); }
public final void visitPostCollect(MeasurementPoint measurementPoint) { if (!collecting || !started) { return; } if (measurementPoint == null) { 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); } }
public final void visitPreMeasurement(MeasurementPoint measurementPoint) { try { if (!collecting) { return; } if (!started) { if (!noStartedErrorMessageFlag) { showMonitorNotStartedMessage(); } return; } if (measurementPoint == null) { return; } doVisitPreMeasurement(measurementPoint); measurementPoint.setTicks(timer.getTicksPerSecond()); measurementPoint.setStartTime(timer.getCurrentTime()); // 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); } }
protected void doVisitPreMeasurement(MeasurementPoint measurementPoint) { MeasurementPoint point = (MeasurementPoint) currentParent.get(); currentParent.set(measurementPoint); measurementPoint.setParent(point); }
public EtmPoint createPoint(String symbolicName) { return new MeasurementPoint(this, symbolicName); }