public static void Display(Rect rect) { //Widgets.DrawBoxSolid(rect, Color.blue); TabStats stats = new TabStats(); stats.GenerateStats(); }
private static void ExecuteWorker(TabStats logic, List <Profiler> profiles) { IsActiveThread = true; Thread.CurrentThread.IsBackground = true; var oldHighest = CurrentTabStats.stats?.Highest ?? 0; double[] sums = new double[profiles.Count]; for (int i = 0; i < profiles.Count; i++) { double locSum = 0; for (int j = 0; j < logic.Granularity; j++) { locSum += profiles[i].History.times[j]; } // Add our averaged values // enter into dict if doesn't already exist if (logic.timePoints.ContainsKey(profiles[i].label)) { logic.timePoints[profiles[i].label].Enqueue((float)locSum / logic.Granularity); } else { logic.timePoints.Add(profiles[i].label, new LinkedQueue <float>(Vertices)); logic.timePoints[profiles[i].label] .Enqueue((float)locSum / logic.Granularity) .MaxValues = Vertices; // set the maximum number of values to our vertex count } sums[i] = locSum; } // get our top LogsPerGraph Array.Sort(sums); IsActiveThread = false; }