mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Common: Remove section measurement from profiler (#1731)
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
This commit is contained in:
		
							parent
							
								
									90501f20e6
								
							
						
					
					
						commit
						e3a8292495
					
				
					 13 changed files with 8 additions and 306 deletions
				
			
		|  | @ -9,6 +9,7 @@ | |||
| #include "citra_qt/debugger/profiler.h" | ||||
| #include "citra_qt/util/util.h" | ||||
| 
 | ||||
| #include "common/common_types.h" | ||||
| #include "common/microprofile.h" | ||||
| #include "common/profiler_reporting.h" | ||||
| 
 | ||||
|  | @ -36,21 +37,9 @@ static QVariant GetDataForColumn(int col, const AggregatedDuration& duration) | |||
|     } | ||||
| } | ||||
| 
 | ||||
| static const TimingCategoryInfo* GetCategoryInfo(int id) | ||||
| { | ||||
|     const auto& categories = GetProfilingManager().GetTimingCategoriesInfo(); | ||||
|     if ((size_t)id >= categories.size()) { | ||||
|         return nullptr; | ||||
|     } else { | ||||
|         return &categories[id]; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| ProfilerModel::ProfilerModel(QObject* parent) : QAbstractItemModel(parent) | ||||
| { | ||||
|     updateProfilingInfo(); | ||||
|     const auto& categories = GetProfilingManager().GetTimingCategoriesInfo(); | ||||
|     results.time_per_category.resize(categories.size()); | ||||
| } | ||||
| 
 | ||||
| QVariant ProfilerModel::headerData(int section, Qt::Orientation orientation, int role) const | ||||
|  | @ -87,7 +76,7 @@ int ProfilerModel::rowCount(const QModelIndex& parent) const | |||
|     if (parent.isValid()) { | ||||
|         return 0; | ||||
|     } else { | ||||
|         return static_cast<int>(results.time_per_category.size() + 2); | ||||
|         return 2; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  | @ -106,17 +95,6 @@ QVariant ProfilerModel::data(const QModelIndex& index, int role) const | |||
|             } else { | ||||
|                 return GetDataForColumn(index.column(), results.interframe_time); | ||||
|             } | ||||
|         } else { | ||||
|             if (index.column() == 0) { | ||||
|                 const TimingCategoryInfo* info = GetCategoryInfo(index.row() - 2); | ||||
|                 return info != nullptr ? QString(info->name) : QVariant(); | ||||
|             } else { | ||||
|                 if (index.row() - 2 < (int)results.time_per_category.size()) { | ||||
|                     return GetDataForColumn(index.column(), results.time_per_category[index.row() - 2]); | ||||
|                 } else { | ||||
|                     return QVariant(); | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue