Example #1
0
 /// <summary>
 /// Clear the stats (stop collecting stats).  Returns existing stats, if any.
 /// </summary>
 public virtual ICUReaderWriterLockStats ClearStats()
 {
     lock (syncLock)
     {
         ICUReaderWriterLockStats result = stats;
         stats = null;
         return(result);
     }
 }
Example #2
0
 /// <summary>
 /// Reset the stats.  Returns existing stats, if any.
 /// </summary>
 public virtual ICUReaderWriterLockStats ResetStats()
 {
     lock (syncLock)
     {
         ICUReaderWriterLockStats result = stats;
         stats = new ICUReaderWriterLockStats();
         return(result);
     }
 }
Example #3
0
        /// <summary>
        /// When the statistics for this service is already enabled,
        /// return the log and resets he statistics.
        /// When the statistics is not enabled, this method enable
        /// the statistics. Used for debugging purposes.
        /// </summary>
        public virtual string Stats()
        {
            ICUReaderWriterLockStats stats = factoryLock.ResetStats();

            if (stats != null)
            {
                return(stats.ToString());
            }
            return("no stats");
        }
Example #4
0
 internal ICUReaderWriterLockStats(ICUReaderWriterLockStats rhs)
     : this(rhs.ReadCount, rhs.MultipleReadCount, rhs.WaitingReadCount, rhs.WriterCount, rhs.WaitingWriterCount)
 {
 }