mirror of
				https://github.com/tiagovignatti/intel-gpu-tools.git
				synced 2025-11-04 12:07:12 +00:00 
			
		
		
		
	stats: Add a bulk version of _push()
In case we want to push a bunch of values in one go. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
		
							parent
							
								
									2fe286985f
								
							
						
					
					
						commit
						3839bacde8
					
				@ -165,6 +165,23 @@ void igt_stats_push(igt_stats_t *stats, uint64_t value)
 | 
				
			|||||||
		stats->max = value;
 | 
							stats->max = value;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * igt_stats_push_array:
 | 
				
			||||||
 | 
					 * @stats: An #igt_stats_t instance
 | 
				
			||||||
 | 
					 * @values: (array length=n_values): A pointer to an array of data points
 | 
				
			||||||
 | 
					 * @n_values: The number of data points to add
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Adds an array of values to the @stats dataset.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					void igt_stats_push_array(igt_stats_t *stats,
 | 
				
			||||||
 | 
								  const uint64_t *values, unsigned int n_values)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						unsigned int i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (i = 0; i < n_values; i++)
 | 
				
			||||||
 | 
							igt_stats_push(stats, values[i]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * igt_stats_get_min:
 | 
					 * igt_stats_get_min:
 | 
				
			||||||
 * @stats: An #igt_stats_t instance
 | 
					 * @stats: An #igt_stats_t instance
 | 
				
			||||||
 | 
				
			|||||||
@ -50,6 +50,8 @@ void igt_stats_fini(igt_stats_t *stats);
 | 
				
			|||||||
bool igt_stats_is_population(igt_stats_t *stats);
 | 
					bool igt_stats_is_population(igt_stats_t *stats);
 | 
				
			||||||
void igt_stats_set_population(igt_stats_t *stats, bool full_population);
 | 
					void igt_stats_set_population(igt_stats_t *stats, bool full_population);
 | 
				
			||||||
void igt_stats_push(igt_stats_t *stats, uint64_t value);
 | 
					void igt_stats_push(igt_stats_t *stats, uint64_t value);
 | 
				
			||||||
 | 
					void igt_stats_push_array(igt_stats_t *stats,
 | 
				
			||||||
 | 
								  const uint64_t *values, unsigned int n_values);
 | 
				
			||||||
uint64_t igt_stats_get_min(igt_stats_t *stats);
 | 
					uint64_t igt_stats_get_min(igt_stats_t *stats);
 | 
				
			||||||
uint64_t igt_stats_get_max(igt_stats_t *stats);
 | 
					uint64_t igt_stats_get_max(igt_stats_t *stats);
 | 
				
			||||||
uint64_t igt_stats_get_range(igt_stats_t *stats);
 | 
					uint64_t igt_stats_get_range(igt_stats_t *stats);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user