static async Task RunTimelinePostprocessor(LogSourcePostprocessorInput input) { string outputFileName = input.OutputFileName; var logProducer = LJT.Extensions.Read(new LJT.Reader(), input.LogFileName, null, input.ProgressHandler).Multiplex(); var profilingEvents = (new LJT.ProfilingTimelineEventsSource()).GetEvents(logProducer); var lister = EnumerableAsync.Merge( profilingEvents ).ToList(); Task[] leafs = new Task[] { lister, logProducer.Open(), }; await Task.WhenAll(leafs); TimelinePostprocessorOutput.SerializePostprocessorOutput( await lister, null, evtTrigger => TextLogEventTrigger.Make((LJT.Message)evtTrigger), input.InputContentsEtagAttr ).SaveToFileOrToStdOut(outputFileName); }
public int CompareTo(TextLogEventTrigger t) { int x; if ((x = Math.Sign(this.StreamPosition - t.StreamPosition)) != 0) { return(x); } if ((x = MessageTimestamp.Compare(this.Timestamp, t.Timestamp)) != 0) { return(x); } return(0); }
static async Task RunTimelinePostprocessor( LogSourcePostprocessorInput input, IModel postprocessingModel) { var logProducer = LJT.Extensions.Read(new LJT.Reader(postprocessingModel.TextLogParser), input.OpenLogFile, input.ProgressHandler).Multiplex(); var profilingEvents = (new LJT.ProfilingTimelineEventsSource()).GetEvents(logProducer); var lister = EnumerableAsync.Merge( profilingEvents ); var serialize = postprocessingModel.Timeline.CreatePostprocessorOutputBuilder() .SetEvents(lister) .SetTriggersConverter(evtTrigger => TextLogEventTrigger.Make((LJT.Message)evtTrigger)) .Build(input); await Task.WhenAll(serialize, logProducer.Open()); }
static async Task RunTimelinePostprocessor( LogSourcePostprocessorInput input, IModel postprocessingModel) { string outputFileName = input.OutputFileName; var logProducer = LJT.Extensions.Read(new LJT.Reader(postprocessingModel.TextLogParser), input.LogFileName, input.ProgressHandler).Multiplex(); var profilingEvents = (new LJT.ProfilingTimelineEventsSource()).GetEvents(logProducer); var lister = EnumerableAsync.Merge( profilingEvents ); var serialize = postprocessingModel.Timeline.SavePostprocessorOutput( lister, null, evtTrigger => TextLogEventTrigger.Make((LJT.Message)evtTrigger), input ); await Task.WhenAll(serialize, logProducer.Open()); }
void IXmlSerializable.ReadXml(XmlReader reader) { data = new TextLogEventTrigger(reader); }
public XmlSerializableTextLogEventTrigger(TextLogEventTrigger data) { this.data = data; }