/// <summary> /// Raises the <see cref="E:WriteLockReleased"/> event. /// </summary> /// <param name="e">The <see cref="com.espertech.esper.compat.threading.TelemetryEventArgs"/> instance containing the event data.</param> protected void OnWriteLockReleased(TelemetryEventArgs e) { if (WriteLockReleased != null) { WriteLockReleased(this, e); } }
/// <summary> /// Raises the <see cref="E:ReadLockReleased"/> event. /// </summary> /// <param name="e">The <see cref="com.espertech.esper.compat.threading.TelemetryEventArgs"/> instance containing the event data.</param> protected void OnReadLockReleased(TelemetryEventArgs e) { if (ReadLockReleased != null) { ReadLockReleased(this, e); } }
/// <summary> /// Finishes tracking performance of a call sequence. /// </summary> /// <param name="timeLockRequest">The time the lock was requested.</param> /// <param name="timeLockAcquire">The time the lock was acquired.</param> private void FinishTrackingPerformance(long timeLockRequest, long timeLockAcquire) { var eventArgs = new TelemetryEventArgs(); eventArgs.Id = _id; eventArgs.RequestTime = timeLockRequest; eventArgs.AcquireTime = timeLockAcquire; eventArgs.ReleaseTime = PerformanceObserver.MicroTime; eventArgs.StackTrace = new StackTrace(); OnLockReleased(eventArgs); }
/// <summary> /// Called when a lock is released. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="com.espertech.esper.compat.threading.TelemetryEventArgs"/> instance containing the event data.</param> public void OnLockReleased(Object sender, TelemetryEventArgs e) { lock (this) { _telemetryEvents.AddLast(e); } }