public The_snapshot_of_a_partition() { var timeBetweenLastEnqueueAndLastCheckpoint = TimeSpan.FromMinutes(1); _timeBetweenLastEnqueueAndPreviousEnqueue = TimeSpan.FromMinutes(10); _timeBetweenCheckpoints = TimeSpan.FromMinutes(1); _howFarBehindForCheckpoint = 1500; _howFarBehindForPreviousEnqueue = 6000; _lastEnqueuedOffset = "12345"; _lastEnqueuedTimeUtc = new DateTime(1975, 4, 1); _lastCheckpointTimeUtc = _lastEnqueuedTimeUtc.Subtract(timeBetweenLastEnqueueAndLastCheckpoint); _incomingByteRate = 99; _outgoingByteRate = 111; var mostRecentCheckpoint = new PartitionCheckpoint { SequenceNumber = _sequenceNumberOfMostRecentEvent - _howFarBehindForCheckpoint, LastCheckpointTimeUtc = _lastCheckpointTimeUtc }; var monitor = new EventHubMonitor( new[] {PartitionId}, partitionId => Task.FromResult(mostRecentCheckpoint), partitionId => Task.FromResult(CreatePartitionDescription(partitionId)), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _snapshot = monitor .CaptureSnapshotAsync(PartitionId) .Result; }
public The_snapshot_of_a_partition() { var timeBetweenLastEnqueueAndLastCheckpoint = TimeSpan.FromMinutes(1); _timeBetweenLastEnqueueAndPreviousEnqueue = TimeSpan.FromMinutes(10); _timeBetweenCheckpoints = TimeSpan.FromMinutes(1); _howFarBehindForCheckpoint = 1500; _howFarBehindForPreviousEnqueue = 6000; _lastEnqueuedOffset = "12345"; _lastEnqueuedTimeUtc = new DateTime(1975, 4, 1); _lastCheckpointTimeUtc = _lastEnqueuedTimeUtc.Subtract(timeBetweenLastEnqueueAndLastCheckpoint); _incomingByteRate = 99; _outgoingByteRate = 111; var mostRecentCheckpoint = new PartitionCheckpoint { SequenceNumber = _sequenceNumberOfMostRecentEvent - _howFarBehindForCheckpoint, LastCheckpointTimeUtc = _lastCheckpointTimeUtc }; var monitor = new EventHubMonitor( new[] { PartitionId }, partitionId => Task.FromResult(mostRecentCheckpoint), partitionId => Task.FromResult(CreatePartitionDescription(partitionId)), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)); _snapshot = monitor .CaptureSnapshotAsync(PartitionId) .Result; }
public The_monitor() { _monitor = new EventHubMonitor( _partitionIds, partitionId => Task.FromResult(new PartitionCheckpoint()), partitionId => Task.FromResult(new PartitionDescription("myHub", "0")), TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(10), _virtualTime); }