public static void Draw(this PerfTree tree) { ImGuiNET.ImGui.SameLine(400); ImGuiNET.ImGui.Text("Count"); ImGuiNET.ImGui.SameLine(500); ImGuiNET.ImGui.Text("Time(ms)"); ImGuiNET.ImGui.SameLine(600); ImGuiNET.ImGui.Text("Percent"); ImGuiNET.ImGui.SameLine(800); ImGuiNET.ImGui.Text("Total Percent"); ImGuiNET.ImGui.Separator(); tree.timer += Time.Delta; bool sample = false; if (tree.timer >= PerfTree.sampleTime) { sample = true; tree.timer = 0; } var it = Profiler.Profilers.GetEnumerator(); while (it.MoveNext()) { var profiler = it.Current.Value; tree.Build(profiler, sample); } tree.root.Draw(0); tree.root.Free(); }
public void Reset(string label, PerfTree profiler, PerfNode parent) { this.label = label; this.profiler = profiler; this.parent = parent; }