protected DistributionMessage() { this.timeStatsEnabled = DistributionStats.enableClockStats; if(this.timeStatsEnabled) { this.timeStamp = DistributionStats.getStatTimeNoCheck(); } }
/** * This is to be used where at GFE layer we have captured * beginTime with System.nanoTime instead of NanoTimer.nanoTime. */ public static final long recordStdTiming(final long startTime) { return DistributionStats.getStatTimeNoCheck() - startTime; }
/** * This is to be used where at GFE layer we have captured * beginTime with System.nanoTime instead of NanoTimer.nanoTime. */ public static final long recordStdTiming(final long startTime) { return DistributionStats.getStatTimeNoCheck() - startTime; }
/** * This is to be used where at GFE layer we have captured * beginTime with System.nanoTime instead of NanoTimer.nanoTime. */ public static final long recordStdTiming(final long startTime) { return DistributionStats.getStatTimeNoCheck() - startTime; }
/** * Sets the timestamp of this message to the current time (in nanos). * @return the number of elapsed nanos since this message's last timestamp */ public long resetTimestamp() { if (this.timeStatsEnabled) { long now = DistributionStats.getStatTimeNoCheck(); long result = now - this.timeStamp; this.timeStamp = now; return result; } else { return 0; } }
this.timeStamp = DistributionStats.getStatTimeNoCheck();
this.timeStatsEnabled = testFlag(status,TIME_STATS_SET); if(timeStatsEnabled) { timeStamp = DistributionStats.getStatTimeNoCheck();
public final void dmProcess(final DM dm) { // TODO: because startTime uses getTimeStamp replyMessageTime // ends up measuring both messageProcessingScheduleTime and // processedMessagesTime. I'm not sure this was intended. // I've added this info to the stat description so update it // if the startTime changes. final long startTime = getTimestamp(); ReplyProcessor21 processor = ReplyProcessor21.getProcessor(processorId); try { this.process(dm, processor); if (DistributionManager.VERBOSE) { LogWriterI18n logger = dm.getLoggerI18n(); logger.info(LocalizedStrings.ReplyMessage_0__PROCESSED__1, new Object[] {processor, this}); } if (this.timeStatsEnabled) { dm.getStats().incReplyMessageTime( DistributionStats.getStatTimeNoCheck() - startTime); } } catch (RuntimeException ex) { if (processor != null) { processor.cancel(getSender(), ex); } throw ex; } }
long time = 0; if (this.timeStatsEnabled) { time = DistributionStats.getStatTimeNoCheck(); dm.getStats().incMessageProcessingScheduleTime(time-getTimestamp());