Example #1
0
 protected void ShowGraphTreemap(GraphKeyType keyType)
 {
     DeltaHistogram.Visible = ViewHistogramByTracebackMenu.Checked = false;
     DeltaList.Visible      = ViewListMenu.Checked = false;
     SetGraphKeyType(keyType);
     SetGraphHistogramVisible(false);
     SetGraphTreemapVisible(true);
 }
Example #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();
            }
        }
Example #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());
            }
        }
Example #4
0
 protected void ShowGraphTreemap(GraphKeyType keyType)
 {
     DeltaHistogram.Visible = ViewHistogramByTracebackMenu.Checked = false;
     DeltaList.Visible = ViewListMenu.Checked = false;
     SetGraphKeyType(keyType);
     SetGraphHistogramVisible(false);
     SetGraphTreemapVisible(true);
 }
Example #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());
            }
        }
Example #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();
        }
Example #7
0
 public StackGraph(GraphKeyType keyType)
     : base(keyType)
 {
     Functions = new StackGraphNodeCollection(KeyType);
 }
Example #8
0
 public StackGraphNodeCollection(GraphKeyType keyType)
 {
     KeyType = keyType;
 }
Example #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();
        }