async Task RunForChromeDebug( IEnumerableAsync <CDL.Message[]> input, LogSourcePostprocessorInput postprocessorInput ) { var inputMultiplexed = input.Multiplex(); ICombinedParser parser = postprocessing.TimeSeries.CreateParser(); var feedNativeEvents = parser.FeedLogMessages(inputMultiplexed); var extensionSources = pluginModel.ChromeDebugTimeSeriesSources.Select( src => src(inputMultiplexed, parser)).ToList(); var tasks = extensionSources.Select(s => s.Task).ToList(); tasks.Add(feedNativeEvents); tasks.AddRange(extensionSources.SelectMany(s => s.MultiplexingEnumerables.Select(e => e.Open()))); tasks.Add(inputMultiplexed.Open()); await Task.WhenAll(tasks); foreach (var ts in parser.GetParsedTimeSeries()) { ts.DataPoints = Postprocessing.TimeSeries.Filters.RemoveRepeatedValues.Filter(ts.DataPoints).ToList(); } await postprocessing.TimeSeries.SavePostprocessorOutput(parser, postprocessorInput); }
Task IModel.SavePostprocessorOutput( ICombinedParser parser, LogSourcePostprocessorInput postprocessorInput ) { return(TimeSeriesPostprocessorOutput.SerializePostprocessorOutput( parser.GetParsedTimeSeries(), parser.GetParsedEvents(), postprocessorInput.openOutputFile, timeSeriesTypesAccess)); }
async Task RunForWebRtcInternalsDump( IEnumerableAsync <DMP.Message[]> input, LogSourcePostprocessorInput postprocessorInput ) { ICombinedParser parser = postprocessing.TimeSeries.CreateParser(); await parser.FeedLogMessages(input, m => m.ObjectId, m => m.Text); await postprocessing.TimeSeries.SavePostprocessorOutput(parser, postprocessorInput); }
async Task RunForSymphonyRtc( IEnumerableAsync <Sym.Message[]> input, LogSourcePostprocessorInput postprocessorInput ) { ICombinedParser parser = postprocessing.TimeSeries.CreateParser(); await parser.FeedLogMessages(input, m => m.Logger, m => string.Format("{0}.{1}", m.Logger, m.Text)); await postprocessing.TimeSeries.SavePostprocessorOutput(parser, postprocessorInput); }
Task IModel.SavePostprocessorOutput( ICombinedParser parser, LogSourcePostprocessorInput postprocessorInput ) { TimeSeriesPostprocessorOutput.SerializePostprocessorOutput( parser.GetParsedTimeSeries(), parser.GetParsedEvents(), postprocessorInput.OutputFileName, timeSeriesTypesAccess); return(Task.FromResult(0)); }
static async Task RunTimeSeriesPostprocessor( LogSourcePostprocessorInput input, IModel postprocessingModel ) { var logProducer = LJT.Extensions.Read(new LJT.Reader(postprocessingModel.TextLogParser), input.OpenLogFile, input.ProgressHandler).Multiplex(); ICombinedParser parser = postprocessingModel.TimeSeries.CreateParser(); var events = parser.FeedLogMessages(logProducer, m => m.Text, m => m.Text); await Task.WhenAll(events, logProducer.Open()); foreach (var ts in parser.GetParsedTimeSeries()) { ts.DataPoints = TimeSeries.Filters.RemoveRepeatedValues.Filter(ts.DataPoints).ToList(); } await postprocessingModel.TimeSeries.SavePostprocessorOutput(parser, input); }