public void Setup() { var info = new TestRunInformation(); info.Name = "TESTNAME"; var chain = new CallChain("TestRoot", "TestRootR", 1); chain.StartTime = 0; chain.EndTime = 10; var c = new CallChain("TestChild1", "TestChild1R", 2); c.StartTime = 1; c.EndTime = 2; chain.AddChild(c); var c2 = new CallChain("TestChild2", "TestChild2R", 3); c2.StartTime = 3; c2.EndTime = 9; chain.AddChild(c2); var child = new CallChain("TestChild3", "TestChild3R", 4); child.StartTime = 4; child.EndTime = 8; var grandchild = new CallChain("TestGrandChild", "TestGrandChildR", 5); grandchild.StartTime = 5; grandchild.EndTime = 7; child.AddChild(grandchild); chain.AddChild(child); info.TestChain = chain; projection = new CouplingCountAndNameProjection(); projection.Index(info); }
public static CallChain BuildChainWithPrefix(string prefix) { var chain = new CallChain(prefix + "Root", prefix + "RootR", 1) { StartTime = 0, EndTime = 10 }; chain.AddChild(new CallChain(prefix + "Child1", prefix + "Child1R", 2) { StartTime = 1, EndTime = 2 }); chain.AddChild(new CallChain(prefix + "Child2", prefix + "Child2R", 3) { StartTime = 2, EndTime = 3 }); var child = new CallChain(prefix + "Child3", prefix + "Child3R", 4) { StartTime = 4, EndTime = 7 }; child.AddChild(new CallChain(prefix + "GrandChild", prefix + "GrandChildR", 5) { StartTime = 5, EndTime = 6 }); chain.AddChild(child); return(chain); }
public static CallChain BuildChainWithPrefix(string prefix) { var chain = new CallChain(prefix + "Root", prefix + "RootR", 1) { StartTime=0,EndTime=10}; chain.AddChild(new CallChain(prefix + "Child1", prefix + "Child1R", 2) { StartTime = 1, EndTime = 2 }); chain.AddChild(new CallChain(prefix + "Child2", prefix + "Child2R", 3) { StartTime = 2, EndTime = 3 }); var child = new CallChain(prefix + "Child3", prefix + "Child3R", 4) { StartTime = 4, EndTime = 7 }; child.AddChild(new CallChain(prefix + "GrandChild", prefix + "GrandChildR", 5) { StartTime = 5, EndTime = 6 }); chain.AddChild(child); return chain; }
public void SetUp() { var chain = new CallChain("Root", "RootR", 1); var c = new CallChain("Child1", "Child1R", 2); c.AddChild(new CallChain("GrandChild", "GrandChildR", 17)); chain.AddChild(c); chain.AddChild(new CallChain("Child2", "Child2R", 3)); var child = new CallChain("Child3", "Child3R", 4); child.AddChild(new CallChain("GrandChild","GrandChildR", 5)); chain.AddChild(child); var information = new TestRunInformation {Name = "test", TestChain = chain}; _paths = PathFinder.FindPathsTo(information, "GrandChild").ToList(); }
public void SetUp() { var chain = new CallChain("Root", "RootR", 1); var c = new CallChain("Child1", "Child1R", 2); c.AddChild(new CallChain("GrandChild", "GrandChildR", 17)); chain.AddChild(c); chain.AddChild(new CallChain("Child2", "Child2R", 3)); var child = new CallChain("Child3", "Child3R", 4); child.AddChild(new CallChain("GrandChild", "GrandChildR", 5)); chain.AddChild(child); var information = new TestRunInformation { Name = "test", TestChain = chain }; _paths = PathFinder.FindPathsTo(information, "GrandChild").ToList(); }
private static CallChain ReadChainItem(BinaryReader reader) { var name = string.Intern(reader.ReadString()); //var runtime = reader.ReadString(); var functionId = reader.ReadInt64(); var item = new CallChain(name, "", functionId); var count = reader.ReadInt32(); var start = reader.ReadDouble(); var end = reader.ReadDouble(); item.StartTime = start; item.EndTime = end; for (int i = 0; i < count; i++) { item.AddChild(ReadChainItem(reader)); } return(item); }
private static CallChain ReadChainItem(BinaryReader reader) { var name = string.Intern(reader.ReadString()); //var runtime = reader.ReadString(); var functionId = reader.ReadInt64(); var item = new CallChain(name, "", functionId); var count = reader.ReadInt32(); var start = reader.ReadDouble(); var end = reader.ReadDouble(); item.StartTime = start; item.EndTime = end; for (int i = 0; i < count; i++) { item.AddChild(ReadChainItem(reader)); } return item; }