testing/scripts/run_rendering_benchmark_with_gated_performance.py
def parse_csv_results(self, csv_obj):
    """ Parses the raw CSV data
    Convers the csv_obj into an array of valid values for averages and
    confidence intervals based on the described upper_limits.

    Args:
      csv_obj: An array of rows (dict) describing the CSV results

    Raturns:
      A dictionary which has the stories as keys and an array of confidence
      intervals and valid averages as data.
    """
    values_per_story = {}
    for row in csv_obj:
      # For now only frame_times is used for testing representatives'
      # performance and cpu_wall_time_ratio is used for validation.
      if row['name'] != METRIC_NAME and row['name'] != 'cpu_wall_time_ratio':
        continue
      story_name = row['stories']
      if (story_name not in self.upper_limit_data):
        continue
      if story_name not in values_per_story:
        values_per_story[story_name] = {
          'averages': [],
          'ci_095': [],
          'cpu_wall_time_ratio': []
        }

      if row['name'] == METRIC_NAME and row['avg'] != '' and row['count'] != 0:
        values_per_story[story_name]['ci_095'].append(float(row['ci_095']))
        values_per_story[story_name]['averages'].append(float(row['avg']))
      elif row['name'] == 'cpu_wall_time_ratio' and row['avg'] != '':
        values_per_story[story_name]['cpu_wall_time_ratio'].append(
          float(row['avg']))

    return values_per_story
 Parses the raw CSV data
    Convers the csv_obj into an array of valid values for averages and
    confidence intervals based on the described upper_limits.

    Args:
      csv_obj: An array of rows (dict) describing the CSV results

    Raturns:
      A dictionary which has the stories as keys and an array of confidence
      intervals and valid averages as data.
    
Parses the raw CSV data
Convers the csv_obj into an array of valid values for averages and
confidence intervals based on the described upper_limits.
Parses the raw CSV data Convers the csv_obj into an array of valid values for averages and confidence intervals based on the described upper_limits .
def parse_csv_results(self, csv_obj):
    values_per_story = {}
    for row in csv_obj:
      if row['name'] != METRIC_NAME and row['name'] != 'cpu_wall_time_ratio':
        continue
      story_name = row['stories']
      if (story_name not in self.upper_limit_data):
        continue
      if story_name not in values_per_story:
        values_per_story[story_name] = {
          'averages': [],
          'ci_095': [],
          'cpu_wall_time_ratio': []
        }
      if row['name'] == METRIC_NAME and row['avg'] != '' and row['count'] != 0:
        values_per_story[story_name]['ci_095'].append(float(row['ci_095']))
        values_per_story[story_name]['averages'].append(float(row['avg']))
      elif row['name'] == 'cpu_wall_time_ratio' and row['avg'] != '':
        values_per_story[story_name]['cpu_wall_time_ratio'].append(
          float(row['avg']))
    return values_per_story
def parse_csv_results ( self , csv_obj ) : values_per_story = { } for row in csv_obj : if row [ 'name' ] != METRIC_NAME and row [ 'name' ] != 'cpu_wall_time_ratio' : continue story_name = row [ 'stories' ] if ( story_name not in self . upper_limit_data ) : continue if story_name not in values_per_story : values_per_story [ story_name ] = { 'averages' : [ ] , 'ci_095' : [ ] , 'cpu_wall_time_ratio' : [ ] } if row [ 'name' ] == METRIC_NAME and row [ 'avg' ] != '' and row [ 'count' ] != 0 : values_per_story [ story_name ] [ 'ci_095' ] . append ( float ( row [ 'ci_095' ] ) ) values_per_story [ story_name ] [ 'averages' ] . append ( float ( row [ 'avg' ] ) ) elif row [ 'name' ] == 'cpu_wall_time_ratio' and row [ 'avg' ] != '' : values_per_story [ story_name ] [ 'cpu_wall_time_ratio' ] . append ( float ( row [ 'avg' ] ) ) return values_per_story
Parses the raw CSV data
Convers the csv_obj into an array of valid values for averages and
confidence intervals based on the described upper_limits.
Parses the raw CSV data Convers the csv_obj into an array of valid values for averages and confidence intervals based on the described upper_limits .
""" Parses the raw CSV data
    Convers the csv_obj into an array of valid values for averages and
    confidence intervals based on the described upper_limits.

    Args:
      csv_obj: An array of rows (dict) describing the CSV results

    Raturns:
      A dictionary which has the stories as keys and an array of confidence
      intervals and valid averages as data.
    """ # For now only frame_times is used for testing representatives' # performance and cpu_wall_time_ratio is used for validation.
self
csv_obj
An array of rows (dict) describing the CSV results
An array of rows ( dict ) describing the CSV results