async static Task RunForHttpArchive( IEnumerableAsync <HAR.Message[]> input, string outputFileName, CancellationToken cancellation, ICodepathTracker templatesTracker, XAttribute contentsEtagAttr ) { HAR.ITimelineEvents timelineEvents = new HAR.TimelineEvents(); var events = EnumerableAsync.Merge( timelineEvents.GetEvents(input) ) .ToFlatList(); await events; if (cancellation.IsCancellationRequested) { return; } if (templatesTracker != null) { (await events).ForEach(e => templatesTracker.RegisterUsage(e.TemplateId)); } TimelinePostprocessorOutput.SerializePostprocessorOutput( await events, null, evtTrigger => TextLogEventTrigger.Make((HAR.Message)evtTrigger), contentsEtagAttr ).SaveToFileOrToStdOut(outputFileName); }
async Task RunForHttpArchive( IEnumerableAsync <HAR.Message[]> input, LogSourcePostprocessorInput postprocessorInput ) { HAR.ITimelineEvents timelineEvents = new HAR.TimelineEvents(); var events = EnumerableAsync.Merge( postprocessorInput.TemplatesTracker.TrackTemplates(timelineEvents.GetEvents(input)) ); await postprocessing.Timeline.CreatePostprocessorOutputBuilder() .SetEvents(events) .SetTriggersConverter(evtTrigger => TextLogEventTrigger.Make((HAR.Message)evtTrigger)) .Build(postprocessorInput); }
async Task RunForHttpArchive( IEnumerableAsync <HAR.Message[]> input, LogSourcePostprocessorInput postprocessorInput ) { HAR.ITimelineEvents timelineEvents = new HAR.TimelineEvents(); var events = EnumerableAsync.Merge( postprocessorInput.TemplatesTracker.TrackTemplates(timelineEvents.GetEvents(input)) ); await postprocessing.Timeline.SavePostprocessorOutput( events, null, evtTrigger => TextLogEventTrigger.Make((HAR.Message)evtTrigger), postprocessorInput ); }