예제 #1
0
        public static string GetActualExecutionPlanHtml(this ExecutionStatus executionStatus)
        {
            var    stats = executionStatus.GetActualExecutionPlan();
            string file;

            var assembly = typeof(ExecutionStatusEx).Assembly;

            using (var stream = assembly.GetManifestResourceStream("Paillave.Etl.ExecutionToolkit.Resources.ActualExecutionPlan.PlotySankey.html"))
                using (var reader = new StreamReader(stream))
                    file = reader.ReadToEnd();

            string html = file.Replace("'<<NODE_NAMES>>'", JsonSerializer.Serialize(stats.NodeNames));

            html = html.Replace("'<<NODE_COLORS>>'", JsonSerializer.Serialize(stats.NodeColors));
            html = html.Replace("'<<LINK_SOURCES>>'", JsonSerializer.Serialize(stats.LinkSources));
            html = html.Replace("'<<LINK_TARGETS>>'", JsonSerializer.Serialize(stats.LinkTargets));
            html = html.Replace("'<<LINK_VALUES>>'", JsonSerializer.Serialize(stats.LinkValues));
            return(html);
        }
 public static string GetActualExecutionPlanJsonVisNetwork(this ExecutionStatus executionStatus)
 {
     return(JsonConvert.SerializeObject(executionStatus.GetActualExecutionPlan()).Replace(@"""\\u", @"""\u"));
 }