private void UpdateGuiLogPreview(PerformanceState state) { PerformanceStateList.Add(state); if (PerformanceStateList.Count > 50 && PerformanceStateList.Count > _measurementTimeInterval) { // keep the GUI list small PerformanceStateList.RemoveAt(0); } }