mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Profiler: Fix off-by-one error when computing average.
This commit is contained in:
		
							parent
							
								
									52654842a0
								
							
						
					
					
						commit
						ed12b08e7a
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -126,10 +126,9 @@ void TimingResultsAggregator::AddFrame(const ProfilingFrameResult& frame_result) | |||
| static AggregatedDuration AggregateField(const std::vector<Duration>& v, size_t len) { | ||||
|     AggregatedDuration result; | ||||
|     result.avg = Duration::zero(); | ||||
| 
 | ||||
|     result.min = result.max = (len == 0 ? Duration::zero() : v[0]); | ||||
| 
 | ||||
|     for (size_t i = 1; i < len; ++i) { | ||||
|     for (size_t i = 0; i < len; ++i) { | ||||
|         Duration value = v[i]; | ||||
|         result.avg += value; | ||||
|         result.min = std::min(result.min, value); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue