/** Resets all time lapse statistics. */ public synchronized void resetStatistics() { mPeakQueueSize = 0; mPeakThreadCount = 0; mPeakServicingCount = 0; mTotalEnqueueAttempts = 0; mTotalEnqueued = 0; mTotalServiced = 0; mTotalExpired = 0; mTotalServiceExceptions = 0; mTotalUncaughtExceptions = 0; mTotalQueueDuration = 0; mTotalServiceDuration = 0; mTimeLapseStart = System.currentTimeMillis(); }
/** Returns a snapshot of the statistics on this TransactionQueue. */ public synchronized TransactionQueueData getStatistics() { return new TransactionQueueData( this, mTimeLapseStart, System.currentTimeMillis(), mQueue.size(), mThreadCount, mServicingCount, mPeakQueueSize, mPeakThreadCount, mPeakServicingCount, mTotalEnqueueAttempts, mTotalEnqueued, mTotalServiced, mTotalExpired, mTotalServiceExceptions, mTotalUncaughtExceptions, mTotalQueueDuration, mTotalServiceDuration); }