/// <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); } }
/// <summary> /// Reset the stats. Returns existing stats, if any. /// </summary> public virtual ICUReaderWriterLockStats ResetStats() { lock (syncLock) { ICUReaderWriterLockStats result = stats; stats = new ICUReaderWriterLockStats(); return(result); } }
/// <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"); }
internal ICUReaderWriterLockStats(ICUReaderWriterLockStats rhs) : this(rhs.ReadCount, rhs.MultipleReadCount, rhs.WaitingReadCount, rhs.WriterCount, rhs.WaitingWriterCount) { }