Esempio n. 1
0
 protected void ShowGraphTreemap(GraphKeyType keyType)
 {
     DeltaHistogram.Visible = ViewHistogramByTracebackMenu.Checked = false;
     DeltaList.Visible      = ViewListMenu.Checked = false;
     SetGraphKeyType(keyType);
     SetGraphHistogramVisible(false);
     SetGraphTreemapVisible(true);
 }
Esempio n. 2
0
        public StackGraphKey(GraphKeyType keyType, string module, string function, string sourceFile)
        {
            KeyType      = keyType;
            ModuleName   = module;
            FunctionName = function;

            var lastIndex = FunctionName.LastIndexOf("::");

            if (lastIndex > 0)
            {
                Namespace = FunctionName.Substring(0, lastIndex);
            }
            else
            {
                Namespace = null;
            }

            SourceFile   = sourceFile;
            SourceFolder = Path.GetDirectoryName(sourceFile);

            switch (keyType)
            {
            case GraphKeyType.Function:
                HashCode = ModuleName.GetHashCode() ^
                           FunctionName.GetHashCode();
                break;

            case GraphKeyType.Module:
                FunctionName = null;
                HashCode     = ModuleName.GetHashCode();
                break;

            case GraphKeyType.Namespace:
                ModuleName   = null;
                FunctionName = null;
                HashCode     = (Namespace ?? "").GetHashCode();
                break;

            case GraphKeyType.SourceFile:
                FunctionName = null;
                ModuleName   = null;
                HashCode     = (SourceFile ?? "").GetHashCode();
                break;

            case GraphKeyType.SourceFolder:
                FunctionName = null;
                ModuleName   = null;
                SourceFile   = null;
                HashCode     = (SourceFolder ?? "").GetHashCode();
                break;

            default:
                throw new InvalidDataException();
            }
        }
Esempio n. 3
0
        protected void SetGraphKeyType(GraphKeyType keyType)
        {
            if (keyType != StackGraphKeyType)
            {
                StackGraphKeyType = keyType;

                GraphHistogram.Items = GraphTreemap.Items = new StackGraphNode[0];
                GraphHistogram.Invalidate();
                GraphTreemap.Invalidate();

                if (PendingRefresh != null)
                {
                    PendingRefresh.Dispose();
                }
                PendingRefresh = Start(RefreshGraph());
            }
        }
Esempio n. 4
0
 protected void ShowGraphTreemap(GraphKeyType keyType)
 {
     DeltaHistogram.Visible = ViewHistogramByTracebackMenu.Checked = false;
     DeltaList.Visible = ViewListMenu.Checked = false;
     SetGraphKeyType(keyType);
     SetGraphHistogramVisible(false);
     SetGraphTreemapVisible(true);
 }
Esempio n. 5
0
        protected void SetGraphKeyType(GraphKeyType keyType)
        {
            if (keyType != StackGraphKeyType) {
                StackGraphKeyType = keyType;

                GraphHistogram.Items = GraphTreemap.Items = new StackGraphNode[0];
                GraphHistogram.Invalidate();
                GraphTreemap.Invalidate();

                if (PendingRefresh != null)
                    PendingRefresh.Dispose();
                PendingRefresh = Start(RefreshGraph());
            }
        }
Esempio n. 6
0
        protected IEnumerator<object> GenerateNewGraph(List<DeltaInfo> newListItems, GraphKeyType keyType)
        {
            var newGraph = new StackGraph(keyType);
            yield return newGraph.Build(Instance, newListItems);

            StackGraph = newGraph;
            GraphHistogram.Items = StackGraph.Functions.OrderedItems.ToArray();
            GraphTreemap.Items = StackGraph.OrderedItems.ToArray();

            GraphHistogram.Invalidate();
            GraphTreemap.Refresh();
        }
Esempio n. 7
0
 public StackGraph(GraphKeyType keyType)
     : base(keyType)
 {
     Functions = new StackGraphNodeCollection(KeyType);
 }
Esempio n. 8
0
 public StackGraphNodeCollection(GraphKeyType keyType)
 {
     KeyType = keyType;
 }
Esempio n. 9
0
        protected IEnumerator <object> GenerateNewGraph(List <DeltaInfo> newListItems, GraphKeyType keyType)
        {
            var newGraph = new StackGraph(keyType);

            yield return(newGraph.Build(Instance, newListItems));

            StackGraph           = newGraph;
            GraphHistogram.Items = StackGraph.Functions.OrderedItems.ToArray();
            GraphTreemap.Items   = StackGraph.OrderedItems.ToArray();

            GraphHistogram.Invalidate();
            GraphTreemap.Refresh();
        }