MCPcopy Create free account
hub / github.com/StereoKit/StereoKit / DrawGraphs

Method DrawGraphs

Examples/StereoKitTest/Tools/LogWindow.cs:117–148  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 }
116
117 void DrawGraphs()
118 {
119 #if !WINDOWS_UWP
120 ulong memPollIdx = (ulong)(Time.Total * 2);
121 if (lastMemPoll != memPollIdx)
122 {
123 lastMemPoll = memPollIdx;
124 using (Process process = Process.GetCurrentProcess())
125 {
126 long managedMem = GC.GetTotalMemory(false);
127 long workingMem = process.WorkingSet64;
128 ramGraph .Add(workingMem / (1024.0f * 1024.0f));
129 managedRamGraph.Add(managedMem / (1024.0f * 1024.0f));
130 }
131 }
132 #endif
133
134 float thirdWidth = (UI.LayoutRemaining.x - UI.Settings.gutter*2) / 3.0f;
135 Vec2 graphSize = V.XY(thirdWidth, UI.LineHeight);
136
137 fpsGraph.Add(Time.Stepf*1000);
138 fpsGraph.Draw(styleGraph, "Frame (ms)", UI.LayoutAt + V.XYZ(0,0,-0.004f), graphSize);
139 UI.LayoutReserve(graphSize);
140 UI.SameLine();
141
142 managedRamGraph.Draw(styleGraph, "Managed (mb)", UI.LayoutAt + V.XYZ(0,0,-0.004f), graphSize);
143 UI.LayoutReserve(graphSize);
144 UI.SameLine();
145
146 ramGraph.Draw(styleGraph, "Total (mb)", UI.LayoutAt + V.XYZ(0, 0, -0.004f), graphSize);
147 UI.LayoutReserve(graphSize);
148 }
149
150 struct DiagGraph
151 {

Callers

nothing calls this directly

Calls 6

LayoutReserveMethod · 0.80
SameLineMethod · 0.80
AddMethod · 0.45
XYMethod · 0.45
DrawMethod · 0.45
XYZMethod · 0.45

Tested by

no test coverage detected