tools/perf/experimental/representative_perf_test_limit_adjuster/adjust_upper_limits.py
def FetchItemData(task_id, benchmark, index, temp_dir):
  """Fetches the performance values (AVG & CI ranges) of tasks.

  Args:
    task_id: The list of item Ids to fetch dat for.
    benchmark: The benchmark these task are on (desktop/mobile).
    index: The index field of the data_frame
    temp_dir: The temp directory to store task data in.

  Returns:
    A data_frame containing the averages and confidence interval ranges.
  """
  query = [
      SWARMING_PATH, 'collect', '-S', 'chromium-swarm.appspot.com',
      '-output-dir', temp_dir, '-perf', task_id
  ]
  try:
    subprocess.check_output(query)
  except Exception as e:
    print(e)

  result_file_path = os.path.join(temp_dir, task_id, 'rendering.' + benchmark,
                                  'perf_results.csv')

  try:
    df = pandas.read_csv(result_file_path)
    df_frame_times = df.loc[df['name'] == 'frame_times']
    df_frame_times = df_frame_times[['stories', 'avg', 'ci_095']]

    df_cpu_wall = df.loc[df['name'] == 'cpu_wall_time_ratio']
    df_cpu_wall = df_cpu_wall[['stories', 'avg']]
    df_cpu_wall = df_cpu_wall.rename(columns={'avg': 'cpu_wall_time_ratio'})

    df = pandas.merge(df_frame_times, df_cpu_wall, on='stories')
    df['index'] = index
    return df
  except:
    print("CSV results were not produced!")
Fetches the performance values (AVG & CI ranges) of tasks.

  Args:
    task_id: The list of item Ids to fetch dat for.
    benchmark: The benchmark these task are on (desktop/mobile).
    index: The index field of the data_frame
    temp_dir: The temp directory to store task data in.

  Returns:
    A data_frame containing the averages and confidence interval ranges.
  
Fetches the performance values (AVG & CI ranges) of tasks.
Fetches the performance values ( AVG & CI ranges ) of tasks .
def FetchItemData(task_id, benchmark, index, temp_dir):
  query = [
      SWARMING_PATH, 'collect', '-S', 'chromium-swarm.appspot.com',
      '-output-dir', temp_dir, '-perf', task_id
  ]
  try:
    subprocess.check_output(query)
  except Exception as e:
    print(e)
  result_file_path = os.path.join(temp_dir, task_id, 'rendering.' + benchmark,
                                  'perf_results.csv')
  try:
    df = pandas.read_csv(result_file_path)
    df_frame_times = df.loc[df['name'] == 'frame_times']
    df_frame_times = df_frame_times[['stories', 'avg', 'ci_095']]
    df_cpu_wall = df.loc[df['name'] == 'cpu_wall_time_ratio']
    df_cpu_wall = df_cpu_wall[['stories', 'avg']]
    df_cpu_wall = df_cpu_wall.rename(columns={'avg': 'cpu_wall_time_ratio'})
    df = pandas.merge(df_frame_times, df_cpu_wall, on='stories')
    df['index'] = index
    return df
  except:
    print("CSV results were not produced!")
def FetchItemData ( task_id , benchmark , index , temp_dir ) : query = [ SWARMING_PATH , 'collect' , '-S' , 'chromium-swarm.appspot.com' , '-output-dir' , temp_dir , '-perf' , task_id ] try : subprocess . check_output ( query ) except Exception as e : print ( e ) result_file_path = os . path . join ( temp_dir , task_id , 'rendering.' + benchmark , 'perf_results.csv' ) try : df = pandas . read_csv ( result_file_path ) df_frame_times = df . loc [ df [ 'name' ] == 'frame_times' ] df_frame_times = df_frame_times [ [ 'stories' , 'avg' , 'ci_095' ] ] df_cpu_wall = df . loc [ df [ 'name' ] == 'cpu_wall_time_ratio' ] df_cpu_wall = df_cpu_wall [ [ 'stories' , 'avg' ] ] df_cpu_wall = df_cpu_wall . rename ( columns = { 'avg' : 'cpu_wall_time_ratio' } ) df = pandas . merge ( df_frame_times , df_cpu_wall , on = 'stories' ) df [ 'index' ] = index return df except : print ( "CSV results were not produced!" )
Fetches the performance values (AVG & CI ranges) of tasks.
Fetches the performance values ( AVG & CI ranges ) of tasks .
"""Fetches the performance values (AVG & CI ranges) of tasks.

  Args:
    task_id: The list of item Ids to fetch dat for.
    benchmark: The benchmark these task are on (desktop/mobile).
    index: The index field of the data_frame
    temp_dir: The temp directory to store task data in.

  Returns:
    A data_frame containing the averages and confidence interval ranges.
  """
A data_frame containing the averages and confidence interval ranges.
A data_frame containing the averages and confidence interval ranges .
task_id
The list of item Ids to fetch dat for.
The list of item Ids to fetch dat for .
benchmark
The benchmark these task are on (desktop/mobile).
The benchmark these task are on ( desktop / mobile ) .
index
The index field of the data_frame
The index field of the data_frame
temp_dir
The temp directory to store task data in.
The temp directory to store task data in .