Ejemplo n.º 1
0
        public PostprocessorsInitializer(
            IPostprocessorsManager postprocessorsManager,
            IUserDefinedFormatsManager userDefinedFormatsManager,
            StateInspector.IPostprocessorsFactory stateInspectorPostprocessorsFactory,
            TimeSeries.IPostprocessorsFactory timeSeriesPostprocessorsFactory
            )
        {
            Func <string, UDF> findFormat = formatName =>
            {
                var ret = userDefinedFormatsManager.Items.FirstOrDefault(
                    f => f.CompanyName == "Google" && f.FormatName == formatName) as UDF;
                if (ret == null)
                {
                    throw new Exception(string.Format("Log format {0} is not registered in LogJoint", formatName));
                }
                return(ret);
            };

            this.chromeDebugLogFormat      = findFormat("Chrome debug log");
            this.webRtcInternalsDumpFormat = findFormat("Chrome WebRTC internals dump as log");

            this.chromeDebugLogMeta = new LogSourceMetadata(
                chromeDebugLogFormat,
                stateInspectorPostprocessorsFactory.CreateChromeDebugPostprocessor(),
                timeSeriesPostprocessorsFactory.CreateChromeDebugPostprocessor()
                );
            postprocessorsManager.RegisterLogType(this.chromeDebugLogMeta);

            this.webRtcInternalsDumpMeta = new LogSourceMetadata(
                webRtcInternalsDumpFormat,
                stateInspectorPostprocessorsFactory.CreateWebRtcInternalsDumpPostprocessor(),
                timeSeriesPostprocessorsFactory.CreateWebRtcInternalsDumpPostprocessor()
                );
            postprocessorsManager.RegisterLogType(this.webRtcInternalsDumpMeta);
        }
Ejemplo n.º 2
0
        public PostprocessorsInitializer(
            IPostprocessorsManager postprocessorsManager,
            IUserDefinedFormatsManager userDefinedFormatsManager,
            StateInspector.IPostprocessorsFactory stateInspectorPostprocessorsFactory,
            TimeSeries.IPostprocessorsFactory timeSeriesPostprocessorsFactory,
            Correlator.IPostprocessorsFactory correlatorPostprocessorsFactory,
            Timeline.IPostprocessorsFactory timelinePostprocessorsFactory
            )
        {
            Func <string, string, UDF> findFormat = (company, formatName) =>
            {
                var ret = userDefinedFormatsManager.Items.FirstOrDefault(
                    f => f.CompanyName == company && f.FormatName == formatName) as UDF;
                if (ret == null)
                {
                    throw new Exception(string.Format("Log format {0} is not registered in LogJoint", formatName));
                }
                return(ret);
            };

            this.chromeDebugLogFormat      = findFormat("Google", "Chrome debug log");
            this.webRtcInternalsDumpFormat = findFormat("Google", "Chrome WebRTC internals dump as log");
            this.chromeDriverLogFormat     = findFormat("Google", "chromedriver");
            this.symRtcLogFormat           = findFormat("Symphony", "RTC log");

            var correlatorPostprocessorType = correlatorPostprocessorsFactory.CreatePostprocessor(this);

            postprocessorsManager.RegisterCrossLogSourcePostprocessor(correlatorPostprocessorType);

            this.chromeDebugLogMeta = new LogSourceMetadata(
                chromeDebugLogFormat,
                stateInspectorPostprocessorsFactory.CreateChromeDebugPostprocessor(),
                timeSeriesPostprocessorsFactory.CreateChromeDebugPostprocessor(),
                timelinePostprocessorsFactory.CreateChromeDebugPostprocessor(),
                correlatorPostprocessorType
                );
            postprocessorsManager.RegisterLogType(this.chromeDebugLogMeta);

            this.webRtcInternalsDumpMeta = new LogSourceMetadata(
                webRtcInternalsDumpFormat,
                stateInspectorPostprocessorsFactory.CreateWebRtcInternalsDumpPostprocessor(),
                timeSeriesPostprocessorsFactory.CreateWebRtcInternalsDumpPostprocessor(),
                correlatorPostprocessorType
                );
            postprocessorsManager.RegisterLogType(this.webRtcInternalsDumpMeta);

            this.chromeDriverLogMeta = new LogSourceMetadata(
                chromeDriverLogFormat,
                timelinePostprocessorsFactory.CreateChromeDriverPostprocessor(),
                correlatorPostprocessorType
                );
            postprocessorsManager.RegisterLogType(this.chromeDriverLogMeta);

            this.symRtcLogMeta = new LogSourceMetadata(
                symRtcLogFormat,
                stateInspectorPostprocessorsFactory.CreateSymphontRtcPostprocessor()
                );
            postprocessorsManager.RegisterLogType(this.symRtcLogMeta);
        }
Ejemplo n.º 3
0
        public static void Register(
            IPostprocessorsManager postprocessorsManager,
            IUserDefinedFormatsManager userDefinedFormatsManager
            )
        {
            var fac = userDefinedFormatsManager.Items.FirstOrDefault(f => f.FormatName == "LogJoint debug trace") as UDF;

            if (fac == null)
            {
                return;
            }
            var timeline = new LogSourcePostprocessorImpl(
                PostprocessorIds.Timeline, "Timeline",                 // todo: avoid copy/pasing of the strings
                (doc, logSource) => DeserializeOutput(doc, logSource),
                (Func <LogSourcePostprocessorInput, Task>)RunTimelinePostprocessor
                );

            postprocessorsManager.RegisterLogType(new LogSourceMetadata(fac, new []
            {
                timeline
            }));
        }