async static Task RunForChromeDriver(
            IEnumerableAsync <CD.Message[]> input,
            string outputFileName,
            CancellationToken cancellation,
            ICodepathTracker templatesTracker,
            XAttribute contentsEtagAttr
            )
        {
            IPrefixMatcher matcher     = new PrefixMatcher();
            var            logMessages = CD.Helpers.MatchPrefixes(input, matcher).Multiplex();

            CD.ITimelineEvents networkEvents = new CD.TimelineEvents(matcher);

            var networkEvts = networkEvents.GetEvents(logMessages);

            matcher.Freeze();

            var events = EnumerableAsync.Merge(
                networkEvts
                )
                         .ToFlatList();

            await Task.WhenAll(events, logMessages.Open());

            if (cancellation.IsCancellationRequested)
            {
                return;
            }

            if (templatesTracker != null)
            {
                (await events).ForEach(e => templatesTracker.RegisterUsage(e.TemplateId));
            }

            TimelinePostprocessorOutput.SerializePostprocessorOutput(
                await events,
                null,
                evtTrigger => TextLogEventTrigger.Make((CD.Message)evtTrigger),
                contentsEtagAttr
                ).SaveToFileOrToStdOut(outputFileName);
        }
        async Task RunForChromeDriver(
            IEnumerableAsync <CD.Message[]> input,
            LogSourcePostprocessorInput postprocessorInput
            )
        {
            IPrefixMatcher matcher     = postprocessing.CreatePrefixMatcher();
            var            logMessages = input.MatchTextPrefixes(matcher).Multiplex();

            CD.ITimelineEvents networkEvents = new CD.TimelineEvents(matcher);
            var endOfTimelineEventSource     = postprocessing.Timeline.CreateEndOfTimelineEventSource <MessagePrefixesPair <CD.Message> > (m => m.Message);

            var extensionSources = pluginModel.ChromeDriverTimeLineEventSources.Select(src => src(
                                                                                           matcher, logMessages, postprocessorInput.TemplatesTracker)).ToArray();

            var networkEvts = networkEvents.GetEvents(logMessages);
            var eofEvts     = endOfTimelineEventSource.GetEvents(logMessages);

            matcher.Freeze();

            var events = extensionSources.Select(s => s.Events).ToList();

            events.Add(networkEvts);
            events.Add(eofEvts);

            var serialize = postprocessing.Timeline.SavePostprocessorOutput(
                EnumerableAsync.Merge(events.ToArray()),
                null,
                evtTrigger => TextLogEventTrigger.Make((CD.Message)evtTrigger),
                postprocessorInput
                );

            var tasks = new List <Task>();

            tasks.Add(serialize);
            tasks.AddRange(extensionSources.SelectMany(s => s.MultiplexingEnumerables.Select(e => e.Open())));
            tasks.Add(logMessages.Open());

            await Task.WhenAll(tasks);
        }