public PipelineReportData Extract( IPipelineTaskStep pipeline, TaskExecutionLog log) { var stepLog = log.StepLogs[pipeline.Name]; var materializationBlockName = pipeline.Input.Name ?? PipelineInput.DefaultName; var blockNames = pipeline.Blocks.Select(x => x.Name).ToArray(); var diagnosticChartsData = DiagnosticDataExtractor.Extract( log.DiagnosticsLog.Diagnostics, stepLog.Duration); return(new PipelineReportData { GlobalData = log.DiagnosticsLog.GlobalDiagnostic, ItemsTimelineData = GetItemsTimelineData(stepLog, materializationBlockName, blockNames).ToArray(), BlockTimesData = GetBlockTimesData(stepLog, materializationBlockName, blockNames).ToArray(), MemoryData = diagnosticChartsData.MemoryData, CpuUsageData = diagnosticChartsData.CpuUsageData }); }
public TaskReportData Extract( TaskDefinition task, TaskExecutionLog log) { var stepNames = task.Steps .Select(x => x.Name) .Where(x => log.StepLogs.ContainsKey(x)) .ToArray(); var diagnosticChartsData = DiagnosticDataExtractor.Extract( log.DiagnosticsLog.Diagnostics, log.TaskDuration); return(new TaskReportData { GlobalData = log.DiagnosticsLog.GlobalDiagnostic, StepsTimelineData = GetStepsTimelineData(log, stepNames).ToArray(), StepTimesData = GetStepTimesData(log, stepNames).ToArray(), MemoryData = diagnosticChartsData.MemoryData, CpuUsageData = diagnosticChartsData.CpuUsageData }); }