mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Renames ShowPlan directories along with corresponding namespaces (#1435)
* Renames ShowPlan directories along with corresponding namespaces * Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils * Revert "Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils" This reverts commit 5dc2696ae906598447eed7360a3f342218432b83. * Reverts show plan tests name change. * Renames show plan test XML files. * Renames ported directory to ShowPlan and updates namespace accordingly
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Execution plan graph object that is sent over JSON RPC
|
/// Execution plan graph object that is sent over JSON RPC
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||||
{
|
{
|
||||||
public class GetExecutionPlanParams
|
public class GetExecutionPlanParams
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.SqlTools.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Main class for Migration Service functionality
|
/// Main class for Migration Service functionality
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds hierarchy of Graph objects from SQL 2000 Actual ShowPlan Record Set
|
/// Builds hierarchy of Graph objects from SQL 2000 Actual ShowPlan Record Set
|
||||||
@@ -8,7 +8,7 @@ using System.ComponentModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
#region FloatTypeConverter
|
#region FloatTypeConverter
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph.Comparison
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan.Comparison
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles operations for creating and comparing skeletons of showplan trees
|
/// Handles operations for creating and comparing skeletons of showplan trees
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph.Comparison
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan.Comparison
|
||||||
{
|
{
|
||||||
public class SkeletonNode
|
public class SkeletonNode
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal sealed class ConditionParser : XmlPlanHierarchyParser
|
internal sealed class ConditionParser : XmlPlanHierarchyParser
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class Constants
|
public class Constants
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses StmtCursorType ShowPlan XML nodes
|
/// Parses StmtCursorType ShowPlan XML nodes
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses StmtCursorType ShowPlan XML nodes
|
/// Parses StmtCursorType ShowPlan XML nodes
|
||||||
@@ -11,7 +11,7 @@ using System.Diagnostics;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base class for building hierarchy of Graph objects from ShowPlan Record Set
|
/// Base class for building hierarchy of Graph objects from ShowPlan Record Set
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class Description
|
public class Description
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class Edge
|
public class Edge
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds hierarchy of Graph objects from SQL 2000 Estimated ShowPlan Record Set
|
/// Builds hierarchy of Graph objects from SQL 2000 Estimated ShowPlan Record Set
|
||||||
@@ -8,7 +8,7 @@ using System.Collections;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
|
|
||||||
public class ExpandableArrayWrapper : ExpandableObjectWrapper
|
public class ExpandableArrayWrapper : ExpandableObjectWrapper
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class ExpandableObjectWrapper : ObjectParser, ICustomTypeDescriptor
|
public class ExpandableObjectWrapper : ObjectParser, ICustomTypeDescriptor
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal sealed class FunctionTypeParser : XmlPlanParser
|
internal sealed class FunctionTypeParser : XmlPlanParser
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class Graph
|
public class Graph
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface represents an abstract builder that gets
|
/// Interface represents an abstract builder that gets
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface represents ability to split an data source containing multiple
|
/// Interface represents ability to split an data source containing multiple
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
||||||
@@ -9,7 +9,7 @@ using System.ComponentModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Status of operator
|
/// Status of operator
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public class NodeBuilderContext
|
public class NodeBuilderContext
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class that creates concrete INodeBuilder instances.
|
/// Class that creates concrete INodeBuilder instances.
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Base class for all object / Node parsers
|
/// Base class for all object / Node parsers
|
||||||
@@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This class converts methods for converting from ShowPlanXML native classes
|
/// This class converts methods for converting from ShowPlanXML native classes
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
public sealed class Operation
|
public sealed class Operation
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ using System.Collections.Generic;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A class that holds information about a physical or logical operator, or a statement.
|
/// A class that holds information about a physical or logical operator, or a statement.
|
||||||
@@ -9,7 +9,7 @@ using System.Xml.Serialization;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// PropertyFactory creates properties based on template properties (this class public properties)
|
/// PropertyFactory creates properties based on template properties (this class public properties)
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal sealed class PropertyValue : PropertyDescriptor
|
internal sealed class PropertyValue : PropertyDescriptor
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
/// Parses ShowPlan XML objects derived from RelOpBaseType type
|
||||||
@@ -10,7 +10,7 @@ using System.ComponentModel;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal sealed class RelOpTypeParser : XmlPlanParser
|
internal sealed class RelOpTypeParser : XmlPlanParser
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RunTimeCounters class stores RunTimeCountersPerThread information
|
/// RunTimeCounters class stores RunTimeCountersPerThread information
|
||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parses stytement type ShowPlan XML nodes
|
/// Parses stytement type ShowPlan XML nodes
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal class XmlPlanHierarchyParser : XmlPlanParser
|
internal class XmlPlanHierarchyParser : XmlPlanParser
|
||||||
{
|
{
|
||||||
@@ -13,7 +13,7 @@ using System.Text;
|
|||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Builds hierarchy of Graph objects from ShowPlan XML
|
/// Builds hierarchy of Graph objects from ShowPlan XML
|
||||||
@@ -9,7 +9,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class for enumerating FunctionType objects
|
/// Class for enumerating FunctionType objects
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
internal static class XmlPlanParserFactory
|
internal static class XmlPlanParserFactory
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A class that lists String constants common to XML Show Plan Node Parsing
|
/// A class that lists String constants common to XML Show Plan Node Parsing
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extension of graph with some handy included methods specific for ShowPlan use
|
/// Extension of graph with some handy included methods specific for ShowPlan use
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
//
|
//
|
||||||
// This source code was auto-generated by xsd, Version=4.8.3928.0.
|
// This source code was auto-generated by xsd, Version=4.8.3928.0.
|
||||||
//
|
//
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph {
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan {
|
||||||
using System.Xml.Serialization;
|
using System.Xml.Serialization;
|
||||||
|
|
||||||
|
|
||||||
@@ -7,17 +7,17 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph;
|
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan;
|
||||||
using Microsoft.SqlTools.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
|
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
|
||||||
{
|
{
|
||||||
public class ShowPlanGraphUtils
|
public class ShowPlanGraphUtils
|
||||||
{
|
{
|
||||||
public static List<ExecutionPlanGraph> CreateShowPlanGraph(string xml, string fileName)
|
public static List<ExecutionPlanGraph> CreateShowPlanGraph(string xml, string fileName)
|
||||||
{
|
{
|
||||||
ShowPlanGraph.ShowPlanGraph[] graphs = ShowPlanGraph.ShowPlanGraph.ParseShowPlanXML(xml, ShowPlanGraph.ShowPlanType.Unknown);
|
ShowPlan.ShowPlanGraph[] graphs = ShowPlan.ShowPlanGraph.ParseShowPlanXML(xml, ShowPlan.ShowPlanType.Unknown);
|
||||||
return graphs.Select(g => new ExecutionPlanGraph
|
return graphs.Select(g => new ExecutionPlanGraph
|
||||||
{
|
{
|
||||||
Root = ConvertShowPlanTreeToExecutionPlanTree(g.Root),
|
Root = ConvertShowPlanTreeToExecutionPlanTree(g.Root),
|
||||||
@@ -96,7 +96,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
|
|||||||
return propsList;
|
return propsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<ExecutionPlanRecommendation> ParseRecommendations(ShowPlanGraph.ShowPlanGraph g, string fileName)
|
private static List<ExecutionPlanRecommendation> ParseRecommendations(ShowPlan.ShowPlanGraph g, string fileName)
|
||||||
{
|
{
|
||||||
return g.Description.MissingIndices.Select(mi => new ExecutionPlanRecommendation
|
return g.Description.MissingIndices.Select(mi => new ExecutionPlanRecommendation
|
||||||
{
|
{
|
||||||
@@ -166,8 +166,8 @@ namespace Microsoft.SqlTools.ServiceLayer
|
|||||||
InitializeHostedServices(serviceProvider, serviceHost);
|
InitializeHostedServices(serviceProvider, serviceHost);
|
||||||
serviceHost.ServiceProvider = serviceProvider;
|
serviceHost.ServiceProvider = serviceProvider;
|
||||||
|
|
||||||
ShowPlan.ExecutionPlanService.Instance.InitializeService(serviceHost);
|
ExecutionPlan.ExecutionPlanService.Instance.InitializeService(serviceHost);
|
||||||
serviceProvider.RegisterSingleService(ShowPlan.ExecutionPlanService.Instance);
|
serviceProvider.RegisterSingleService(ExecutionPlan.ExecutionPlanService.Instance);
|
||||||
|
|
||||||
serviceHost.InitializeRequestHandlers();
|
serviceHost.InitializeRequestHandlers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -572,7 +572,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="resultSetIndex">The index for selecting the result set</param>
|
/// <param name="resultSetIndex">The index for selecting the result set</param>
|
||||||
/// <returns>An execution plan object</returns>
|
/// <returns>An execution plan object</returns>
|
||||||
public Task<ExecutionPlan> GetExecutionPlan(int resultSetIndex)
|
public Task<Contracts.ExecutionPlan> GetExecutionPlan(int resultSetIndex)
|
||||||
{
|
{
|
||||||
ResultSet targetResultSet;
|
ResultSet targetResultSet;
|
||||||
lock (resultSets)
|
lock (resultSets)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
|
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests
|
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
/// <param name="batchIndex">The index for selecting the batch item</param>
|
/// <param name="batchIndex">The index for selecting the batch item</param>
|
||||||
/// <param name="resultSetIndex">The index for selecting the result set</param>
|
/// <param name="resultSetIndex">The index for selecting the result set</param>
|
||||||
/// <returns>The Execution Plan, if the result set has one</returns>
|
/// <returns>The Execution Plan, if the result set has one</returns>
|
||||||
public Task<ExecutionPlan> GetExecutionPlan(int batchIndex, int resultSetIndex)
|
public Task<Contracts.ExecutionPlan> GetExecutionPlan(int batchIndex, int resultSetIndex)
|
||||||
{
|
{
|
||||||
// Sanity check to make sure that the batch is within bounds
|
// Sanity check to make sure that the batch is within bounds
|
||||||
if (batchIndex < 0 || batchIndex >= Batches.Length)
|
if (batchIndex < 0 || batchIndex >= Batches.Length)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using Microsoft.SqlTools.ServiceLayer.Hosting;
|
|||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
|
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Workspace;
|
using Microsoft.SqlTools.ServiceLayer.Workspace;
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
/// Generates the execution plan from the table returned
|
/// Generates the execution plan from the table returned
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An execution plan object</returns>
|
/// <returns>An execution plan object</returns>
|
||||||
public Task<ExecutionPlan> GetExecutionPlan()
|
public Task<Contracts.ExecutionPlan> GetExecutionPlan()
|
||||||
{
|
{
|
||||||
// Process the action just in case it hasn't been yet
|
// Process the action just in case it hasn't been yet
|
||||||
ProcessSpecialAction();
|
ProcessSpecialAction();
|
||||||
@@ -342,7 +342,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ExecutionPlan
|
return new Contracts.ExecutionPlan
|
||||||
{
|
{
|
||||||
Format = format,
|
Format = format,
|
||||||
Content = content
|
Content = content
|
||||||
|
|||||||
@@ -31,10 +31,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove=".\ShowPlan\TestExecution.xml" />
|
<Content Remove=".\ShowPlan\TestExecution.xml" />
|
||||||
<EmbeddedResource Include=".\ShowPlan\TestExecutionPlan.xml" />
|
<EmbeddedResource Include="ShowPlan\TestShowPlan.xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Remove=".\ShowPlan\TestExecutionPlanRecommendations.xml" />
|
<EmbeddedResource Include="ShowPlan\TestShowPlanRecommendations.xml" />
|
||||||
<EmbeddedResource Include=".\ShowPlan\TestExecutionPlanRecommendations.xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -30,7 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution
|
|||||||
// If:
|
// If:
|
||||||
// ... I have a result set and I ask for a valid execution plan
|
// ... I have a result set and I ask for a valid execution plan
|
||||||
ResultSet planResultSet = b.ResultSets.First();
|
ResultSet planResultSet = b.ResultSets.First();
|
||||||
ExecutionPlan plan = planResultSet.GetExecutionPlan().Result;
|
ServiceLayer.QueryExecution.Contracts.ExecutionPlan plan = planResultSet.GetExecutionPlan().Result;
|
||||||
Assert.AreEqual("xml", plan.Format);
|
Assert.AreEqual("xml", plan.Format);
|
||||||
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");
|
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution
|
|||||||
Batch b = Common.GetExecutedBatchWithExecutionPlan();
|
Batch b = Common.GetExecutedBatchWithExecutionPlan();
|
||||||
|
|
||||||
// ... And I ask for a valid execution plan
|
// ... And I ask for a valid execution plan
|
||||||
ExecutionPlan plan = b.GetExecutionPlan(0).Result;
|
ServiceLayer.QueryExecution.Contracts.ExecutionPlan plan = b.GetExecutionPlan(0).Result;
|
||||||
|
|
||||||
Assert.AreEqual("xml", plan.Format);
|
Assert.AreEqual("xml", plan.Format);
|
||||||
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");
|
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");
|
||||||
|
|||||||
@@ -4,16 +4,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
//
|
|
||||||
// Copyright (c) Microsoft. All rights reserved.
|
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
||||||
//
|
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
|
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
|
||||||
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
|
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
|
||||||
@@ -25,7 +20,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
|
|||||||
[Test]
|
[Test]
|
||||||
public void ParseXMLFileReturnsValidShowPlanGraph()
|
public void ParseXMLFileReturnsValidShowPlanGraph()
|
||||||
{
|
{
|
||||||
ReadFile(".ShowPlan.TestExecutionPlan.xml");
|
ReadFile(".ShowPlan.TestShowPlan.xml");
|
||||||
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
||||||
Assert.AreEqual(1, showPlanGraphs.Count, "exactly one show plan graph should be returned");
|
Assert.AreEqual(1, showPlanGraphs.Count, "exactly one show plan graph should be returned");
|
||||||
Assert.NotNull(showPlanGraphs[0], "graph should not be null");
|
Assert.NotNull(showPlanGraphs[0], "graph should not be null");
|
||||||
@@ -35,7 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
|
|||||||
[Test]
|
[Test]
|
||||||
public void ParsingNestedProperties()
|
public void ParsingNestedProperties()
|
||||||
{
|
{
|
||||||
ReadFile(".ShowPlan.TestExecutionPlan.xml");
|
ReadFile(".ShowPlan.TestShowPlan.xml");
|
||||||
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
|
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
|
||||||
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
||||||
ExecutionPlanNode rootNode = showPlanGraphs[0].Root;
|
ExecutionPlanNode rootNode = showPlanGraphs[0].Root;
|
||||||
@@ -52,7 +47,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
|
|||||||
public void ParseXMLFileWithRecommendations()
|
public void ParseXMLFileWithRecommendations()
|
||||||
{
|
{
|
||||||
//The first graph in this execution plan has 3 recommendations
|
//The first graph in this execution plan has 3 recommendations
|
||||||
ReadFile(".ShowPlan.TestExecutionPlanRecommendations.xml");
|
ReadFile(".ShowPlan.TestShowPlanRecommendations.xml");
|
||||||
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
|
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
|
||||||
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
|
||||||
List<ExecutionPlanRecommendation> rootNode = showPlanGraphs[0].Recommendations;
|
List<ExecutionPlanRecommendation> rootNode = showPlanGraphs[0].Recommendations;
|
||||||
|
|||||||
Reference in New Issue
Block a user