gcpdiag/runbook/gce/vm_performance.py [1280:1323]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                       total_disk_size: int, search_str: str, next_hop: str,
                       next_hop_val: str):

    # Data fetch for limits per GB and Baseline
    r_iops_limit_per_gb = float(
        limits_data['iops'][disktype]['Read IOPS per GiB'])
    w_iops_limit_per_gb = float(
        limits_data['iops'][disktype]['Write IOPS per GiB'])
    r_throughput_limit_per_gb = float(
        limits_data['throughput'][disktype]['Throughput per GiB (MiBps)'])
    w_throughput_limit_per_gb = float(
        limits_data['throughput'][disktype]['Throughput per GiB (MiBps)'])
    baseline_iops = float(
        limits_data['baseline'][disktype]['Baseline IOPS per VM'])
    baseline_throughput = float(
        limits_data['baseline'][disktype]['Baseline Throughput (MiBps) per VM'])

    # Calculating VM Baseline performance
    vm_baseline_performance_r_iops = baseline_iops + (r_iops_limit_per_gb *
                                                      total_disk_size)
    vm_baseline_performance_w_iops = baseline_iops + (w_iops_limit_per_gb *
                                                      total_disk_size)
    vm_baseline_performance_r_throughput = baseline_throughput + (
        r_throughput_limit_per_gb * total_disk_size)
    vm_baseline_performance_w_throughput = baseline_throughput + (
        w_throughput_limit_per_gb * total_disk_size)

    max_read_throuput = 10000000
    max_write_throuput = 10000000
    max_read_iops = 10000000
    max_write_iops = 10000000
    for mach_fam_catagory in mach_fam_json_data:
      if search_str and search_str in mach_fam_catagory:
        for item in mach_fam_json_data[mach_fam_catagory][disktype]:
          if item[next_hop] == next_hop_val:
            max_write_iops = item['Maximum write IOPS']
            max_read_iops = item['Maximum read IOPS']
            max_read_throuput = item['Maximum read throughput (MiBps)']
            max_write_throuput = item['Maximum write throughput (MiBps)']

    return (vm_baseline_performance_r_iops, max_read_iops,
            vm_baseline_performance_r_throughput, max_read_throuput,
            vm_baseline_performance_w_iops, max_write_iops,
            vm_baseline_performance_w_throughput, max_write_throuput)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



