public virtual void GetStatistics(ProjectionStatistics info) { info.Mode = _projectionConfig.Mode; info.Position = _lastProcessedEventPosition.LastTag; info.Progress = _lastProcessedEventProgress; info.LastCheckpoint = string.Format(CultureInfo.InvariantCulture, "{0}", _lastCompletedCheckpointPosition); info.EventsProcessedAfterRestart = _eventsProcessedAfterRestart; info.WritePendingEventsBeforeCheckpoint = _closingCheckpoint != null ? _closingCheckpoint.GetWritePendingEvents() : 0; info.WritePendingEventsAfterCheckpoint = _currentCheckpoint != null ? _currentCheckpoint.GetWritePendingEvents() : 0; info.ReadsInProgress = /*_readDispatcher.ActiveRequestCount*/ + +(_closingCheckpoint != null ? _closingCheckpoint.GetReadsInProgress () : 0) + (_currentCheckpoint != null ? _currentCheckpoint.GetReadsInProgress () : 0); info.WritesInProgress = (_closingCheckpoint != null ? _closingCheckpoint.GetWritesInProgress() : 0) + (_currentCheckpoint != null ? _currentCheckpoint.GetWritesInProgress() : 0); info.CheckpointStatus = _inCheckpoint ? "Requested" : ""; }
public ProjectionStatistics GetStatistics() { return(new ProjectionStatistics { Mode = _projectionConfig.Mode, Name = null, Position = _lastProcessedEventPosition.LastTag, StateReason = "", Status = "", LastCheckpoint = String.Format(CultureInfo.InvariantCulture, "{0}", _lastCompletedCheckpointPosition), EventsProcessedAfterRestart = _eventsProcessedAfterRestart, BufferedEvents = -1, WritePendingEventsBeforeCheckpoint = _closingCheckpoint != null?_closingCheckpoint.GetWritePendingEvents() : 0, WritePendingEventsAfterCheckpoint = _currentCheckpoint != null?_currentCheckpoint.GetWritePendingEvents() : 0, ReadsInProgress = /*_readDispatcher.ActiveRequestCount*/ + +(_closingCheckpoint != null ? _closingCheckpoint. GetReadsInProgress() : 0) + (_currentCheckpoint != null ? _currentCheckpoint. GetReadsInProgress() : 0), WritesInProgress = ((_inCheckpointWriteAttempt != 0) ? 1 : 0) + (_closingCheckpoint != null ? _closingCheckpoint.GetWritesInProgress() : 0) + (_currentCheckpoint != null ? _currentCheckpoint.GetWritesInProgress() : 0), PartitionsCached = -1, CheckpointStatus = _inCheckpointWriteAttempt > 0 ? "Writing (" + _inCheckpointWriteAttempt + ")" : (_inCheckpoint ? "Requested" : ""), }); }
public virtual void GetStatistics(ProjectionStatistics info) { info.Position = (_lastProcessedEventPosition.LastTag ?? (object)"").ToString(); info.Progress = _lastProcessedEventProgress; info.LastCheckpoint = _lastCompletedCheckpointPosition != null ? _lastCompletedCheckpointPosition.ToString() : ""; info.EventsProcessedAfterRestart = _eventsProcessedAfterRestart; info.WritePendingEventsBeforeCheckpoint = _closingCheckpoint != null ? _closingCheckpoint.GetWritePendingEvents() : 0; info.WritePendingEventsAfterCheckpoint = (_currentCheckpoint != null ? _currentCheckpoint.GetWritePendingEvents() : 0); info.ReadsInProgress = /*_readDispatcher.ActiveRequestCount*/ + +(_closingCheckpoint != null ? _closingCheckpoint.GetReadsInProgress() : 0) + (_currentCheckpoint != null ? _currentCheckpoint.GetReadsInProgress() : 0); info.WritesInProgress = (_closingCheckpoint != null ? _closingCheckpoint.GetWritesInProgress() : 0) + (_currentCheckpoint != null ? _currentCheckpoint.GetWritesInProgress() : 0); info.CheckpointStatus = _inCheckpoint ? "Requested" : ""; }