Exemple #1
0
        private IRecordWriter CreateRecordWriter(string name, IStatisticsCollector statistics, AsyncManualResetEvent signal)
        {
            IRecordWriter writer = new RecordWriter(
                log.ForContext(name),
                () => PreciseDateTime.UtcNow,
                Constants.EventProtocolVersion,
                settings.MaximumRecordSize);

            writer = new ReportingWriter(writer, statistics);

            writer = new SignalingWriter(
                writer,
                statistics,
                signal,
                settings.MaximumPerStreamMemoryConsumption,
                SignalTransitionThreshold,
                SignalConstantThreshold);

            return(writer);
        }
Exemple #2
0
 public void TestSetup()
 {
     baseWriter      = Substitute.For <IRecordWriter>();
     statistics      = Substitute.For <IStatisticsCollector>();
     reportingWriter = new ReportingWriter(baseWriter, statistics);
 }