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